Configuring Timer (Values of PSC and ARR)

Hi,

I was configuring Timer 1 for STM32F107RB.

The clock source is HSI and is at 8MHz.

Inorder to get a 1 second interrupt, i set the

prescaler (RCC_PSC) : to 800

reload_value (RCC_ARR): to 10000

But the program did not run (I was in debug mode - using IAR).

while playing around with the values, I found that the max values for which the program ran was

799 for the PSC

and 10000 for the ARR.

Why is this? Is there a limit?

Also, If I reset the prescaler value to a higher value at a later stage in the program, then the program runs.

Is there some initial setup limitations??