STM32 Clock Configuration Calculator

Configure STM32 system clocks with precision. Select MCU series, enter PLL parameters, and instantly calculate all bus frequencies.

Calculator

About This Calculator

STM32 microcontrollers feature a flexible multi-PLL clock tree that can derive system clocks from HSI, HSE, or PLL sources. The PLL path offers the widest frequency range but requires careful configuration of multiple dividers and multipliers. This calculator takes your HSE crystal frequency, PLL parameters (M, N, P, Q), and bus prescalers to compute every clock frequency in the chain — from VCO through SYSCLK, HCLK, and down to APB peripheral and timer clocks.

How to Use

  1. Select MCU Series — Choose your STM32 family (F1, F4, F7, H7) to enable automatic frequency limit checking.
  2. Set HSE Frequency — Enter your external crystal or oscillator frequency (typically 8 or 25 MHz).
  3. Configure PLL — Adjust PLLM (input divider), PLLN (VCO multiplier), PLLP (system clock divider), and PLLQ (USB/SDIO divider). Refer to your target MCU's reference manual for valid ranges.
  4. Choose Bus Prescalers — Set AHB, APB1, and APB2 prescalers to keep bus frequencies within their rated maximums.
  5. Read Results — All frequencies update in real time. Red or amber highlights warn of out-of-range values.

Clock Tree Formulas

VCO= HSE / PLLM × PLLN
PLLCLK= VCO / PLLP
PLLQCLK= VCO / PLLQ (targets 48 MHz for USB/SDIO)
SYSCLK= PLLCLK (when PLL is the source)
HCLK (AHB)= SYSCLK / AHB prescaler
PCLK1 (APB1)= HCLK / APB1 prescaler
PCLK2 (APB2)= HCLK / APB2 prescaler
APBx Timer Clock= PCLKx × 2 if APB prescaler > 1, otherwise = PCLKx