Skip to main content
DD-CAT IDE logoDD-CAT IDE

STM32 Timer PSC / ARR Calculator

Favorite

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)

f_clkTimer clock÷2PSCARR 36000overflows at the countf_out = 1 kHzf_out = f_clk / [(PSC+1)(ARR+1)]
Prescaler (PSC+1)2
Auto-reload (ARR+1)36000
Register values PSC / ARR1 / 35999
Actual frequency1 kHz
Actual period1 ms
Counter resolution (1 count)27.78 ns
Max period at this PSC1.82 ms

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.