cancel
Showing results for 
Search instead for 
Did you mean: 

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

shri7
Associate

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 1
AScha.3
Super User

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".