AnsweredAssumed Answered

CubeMX L4 V1.11.0 Generated Code Issue

Question asked by buga.d_niel on Mar 19, 2018
Latest reply on May 10, 2018 by houda ghabri

I have a project for the L452 where I use MSI as the PLL input to generate SYSCLK and use PLLSAI1 to generate clock for the SAI1 peripherial. In my case, PLLM is 1 and it is set correctly for the SAI1 PLL but the generated code does not initialize the variable for RCC_OscInitStruct.PLL.PLLM. Because this initialization is missing (either because it is 1, or because I use SAI1 that should also set it, I don't know), a check in RCCEx_PLLSAI1_Config fails (i.e. the uninitialized value becomes garbage that sets the PLLM to 5 where I want it to be 1), making the whole clock config fail.


Adding back the missing initialization, everything works as expected.