2025-11-19 1:43 PM
I'm in the middle of attempting to reconfigure the clock tree on my STM32F303K8. The old clock tree looks like
The new clock tree looks like
The old clock tree works fine. The new clock tree always fails on boot; not always in the same address but always in the neighbourhood of HAL_RCC_ClockConfig. An example stack trace looks like
In this case it claims to have failed on this line 769 of HAL_RCC_ClockConfig:
/* Get Start Tick */
tickstart = HAL_GetTick();This is failing in the MX-generated code well before any of my own code runs. The goal is to keep the CPU clock at 64 MHz but reduce everything after the AHB prescaler. The diff of the RCC section in the .ioc file looks like this: