Generating the hardware delays using timers in STM32F2
As usual, the programming manual is a good place to start. Take a look at page 429:



So the line:

TIM3-&gt;PSC   = 30000-1;


Sets the prescaler to 30000. 

The ARR (auto-reload) register is configured as:



And the line:

TIM3-&gt;ARR   = 2-1; 


Sets the value to 2-1 (which is 1, and I'm not sure why they are doing it that way). 

So for the STM32, the actual calculation depends on which clock source is feeding your timers, either APB1 (max 60MHz) or APB2 (max 30MHz). In your case, this is APB1. 

So the counter clock frequency is 60,000,000 / 30,000 = 2,000Hz. This gives you a .5ms on the clock for each "count". Since the count has to go from 0->1, this means that your actual frequency is 1ms (and probably why the original programmer typed 2-1, to illustrate that it needs 2 "periods" to generate an interrupt).