SystemClock_Config() fails with some clock rates
I'm trying a simple blinking LED on a STM32H743VIT6 with STM32CubeIDE 1.13.2, using the clock configuration wizard. When the clock rate is set to 90MHz everything is fine, but at 480MHz the program cannot get past the SystemClock_Config() call.
When stepping through the code with a debug build, inside HAL_RCC_ClockConfig() this macro triggers the ST-Link to lose connection:
MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource);
When running a release build, the result is as if the SystemClock_Config() caused an endless loop.
Details: https://youtu.be/n0iYG4h2w8A
The clock source in the video is a 12MHz crystal but the same problem still occurs when not using it. I've never used a H7 before, maybe there's something I'm missing?
