STM32F4 PWM Calculator
Quickly calculate the PSC, ARR, and CCR values for STM32F4 timers and generate precise PWM signals. This tool helps you achieve the desired frequency and duty cycle without manually guessing prescaler and auto-reload values. Simply select your timer, input your APB clocks, desired PWM frequency, and duty cycle — the calculator does the rest, providing a ready-to-use configuration for STM32CubeIDE or CubeMX. Note that this calculator is specifically designed for the STM32F4 series — timer availability, APB bus assignments, and clock limits may differ on other STM32 families.
PSC = ⌊Tclk / (F × (ARR+1))⌋ − 1Maximise ARR → best resolution
CCR = round(ARR × Duty / 100)F_actual = Tclk / ((PSC+1)×(ARR+1))
Explore More Tools
Return to the Tools Hub to access all STM32, ESP32, LCD, and other embedded development utilities.
Go to Tools Hub