Utilities Web

Timer Interrupt Period / Clock Divider Calculator

Calculate interrupt period and frequency from clock, prescaler, and count value. Reverse-calculate optimal PSC/ARR from target period

How to Use

  1. Select an MCU preset (STM32 / SysTick / AVR / Custom)
  2. Select calculation direction (Reverse-calculate / Forward)
  3. Enter timer clock (example: 72M). Frequently used clocks can also be selected from buttons
  4. For reverse-calculation, enter target period (or interrupt frequency) and optimal PSC / ARR candidates are displayed in order of minimum error and readability
  5. For forward direction, enter prescaler and count register to display interrupt period, frequency, and count clock

Use Cases

  • When you want to reverse-calculate PSC and ARR from target interrupt period (e.g., 1ms, 50ms)
  • When you want to verify actual interrupt period and frequency from configured PSC / ARR
  • When you want to know the longest period this timer / SysTick can create (maximum measurable period)
  • When you want to quickly determine timer settings for RTOS tick or periodic processing

Frequently Asked Questions

How do I determine PSC and ARR from target period? ▼

Interrupt period is determined by Period = (PSC+1)×(ARR+1)÷Clock. Even for the same period, there are many (PSC, ARR) combinations, which affect the readability of count clock (e.g., 1MHz = 1µs steps). This tool's reverse-calculation enumerates divisors of the target ratio Clock÷Frequency to cover all error-free solutions, and presents candidates in order of minimum error → most readable count clock → smallest divisor.

How long is the maximum period I can create with a 16-bit timer or SysTick? ▼

Maximum measurable period = Maximum Prescaler × Maximum Count ÷ Clock. For example, STM32 16-bit timer + 72MHz has a limit of ~59.65 seconds, and SysTick (24-bit, ÷8) + 72MHz has a limit of ~1.86 seconds. Periods exceeding this cannot be created in a single overflow and require software counters or timer chaining. This tool displays the maximum/minimum period above the candidate table.

What is the difference between STM32's PSC+1, ARR+1 and AVR / SysTick? ▼

STM32 divides by (register value + 1) for both prescaler and counter (PSC+1, ARR+1). AVR has discrete prescaler choices {1,8,64,256,1024} and period is TOP+1. SysTick has no prescaler (÷8 is a CLKSOURCE selection) and uses a 24-bit down counter where period is (RELOAD+1)÷Clock. This tool absorbs these differences through preset parameters (offset, width, discrete sets).

Related Tools