Buggy SystemClock_Config()
I use STM32CubeIDE 1.13.0 to generate code for NUCLEO-L476RG.
The generated SystemClock_Config() put flash latency configuration after the clock configuration. I don't know why it works for the first call, but if I call it after exiting stop mode, it make some weird error.
If i put the flash latency configuration after the voltage configuration and before clock configuration, it works correctly.
Is there a reason to put the flash latency configuration after the clock configuration ?
Would it be better to generate code that put the flash latency configuration before the clock configuration so we can use the same function for exiting stop mode ?