STM32 Timer PSC / ARR Calculator
From the timer clock and target frequency or period, get prescaler PSC and auto-reload ARR plus the values to write to the registers and the resulting error.
Key points
STM32 Timer PSC / ARR Calculator: From the timer clock and target frequency or period, get prescaler PSC and auto-reload ARR plus the values to write to the registers and the resulting error. Formula: f_out = f_clk / [(PSC+1)(ARR+1)]. Enter parameters on the DD-CAT IDE online tool page to get results instantly, with a calculation-model diagram that updates with the inputs. PSC divides first: a large prescaler coarsens resolution, so keep ARR in the 1000–60000 range for both range and precision. STM32 ARR supports preload (ARPE), so changing the period at runtime produces no glitch.
Inputs
f_out = f_clk / [(PSC+1)(ARR+1)]Calculation model (updates with parameters)
| Prescaler (PSC+1) | 2 | |
| Auto-reload (ARR+1) | 36000 | |
| Register values PSC / ARR | 1 / 35999 | Register value = divider − 1 |
| Actual frequency | 1 kHz | target 1 kHz, error +0.000% |
| Actual period | 1 ms | |
| Counter resolution (1 count) | 27.78 ns | Sets the finest PWM/capture step |
| Max period at this PSC | 1.82 ms | 16 bits计数器跑满 |
Engineering notes
- PSC divides first: a large prescaler coarsens resolution, so keep ARR in the 1000–60000 range for both range and precision.
- STM32 ARR supports preload (ARPE), so changing the period at runtime produces no glitch.
FAQ
- What is STM32 Timer PSC / ARR Calculator for?
- From the timer clock and target frequency or period, get prescaler PSC and auto-reload ARR plus the values to write to the registers and the resulting error.
- What is the formula for STM32 Timer PSC / ARR Calculator?
- Core formula: f_out = f_clk / [(PSC+1)(ARR+1)]. The tool returns results instantly using this formula and the selected parameters.
- What engineering notes should I keep in mind when using STM32 Timer PSC / ARR Calculator?
- PSC divides first: a large prescaler coarsens resolution, so keep ARR in the 1000–60000 range for both range and precision. STM32 ARR supports preload (ARPE), so changing the period at runtime produces no glitch.