Skip to main content
Associate
March 23, 2026
Question

STM32H7 SYSCLK stuck at 64 MHz (HSI), PLL not switching

  • March 23, 2026
  • 1 reply
  • 165 views

I am using an STM32H7 MCU and configuring the system clock to 400 MHz using CubeMX. The clock tree shows SYSCLK = 400 MHz, and MCO2 is configured to output SYSCLK.

However, when I debug:

HAL_RCC_GetSysClockFreq() returns 64 MHz

RCC->CFGR shows SWS = 0 (HSI is used)

SW = 0, meaning the system is not switching to PLL

 

It seems that the PLL is not being selected or is failing to lock, and the system remains on HSI. I have configured PLL and SYSCLK source in CubeMX, but the change is not reflected at runtime.

HAL_RCC_GetSysClockFreq() RETURNS 64MHZ

Screenshot 2026-03-23 at 1.54.35 PM.png

 

Screenshot 2026-03-23 at 2.02.04 PM.png

Screenshot 2026-03-23 at 12.46.26 PM.png

Screenshot 2026-03-23 at 12.51.18 PM.png

1 reply

AScha.3
Super User
March 23, 2026

So set the HSE to the real frequency it has on your board...

then choose HSE on clock tree and dont use the frac /fractional setting.

like this:

Bildschirmfoto_2026-03-23_10-13-15.png

"If you feel a post has answered your question, please click ""Accept as Solution""."