2026-03-23 1:37 AM
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
2026-03-23 2:16 AM
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: