AnsweredAssumed Answered

CubeMX creates broken SystemClock_Config()

Question asked by kleier.hermann on Nov 4, 2016
Latest reply on Apr 1, 2017 by Oller.Sebastian.002
In STM32Cube MX 4.17 I have set up an empty STM32L476 Nucleo project with and created code for the Low-Layer API. The parameters were:
The function SystemClock_Config() of the generated code starts with

void SystemClock_Config(void)
   /* Wait till MSI is ready */
  while(LL_RCC_MSI_IsReady() != 1)
   if(LL_FLASH_GetLatency() != LL_FLASH_LATENCY_2)

The documentation (DocID024597 Rev 4, section 5.1.7 Dynamic voltage scaling management) reasonably states that the FLASH latency must be set up before the core voltage is changed.
However the function SystemClock_Config() does it the other way around. This may work under limited conditions…