2015-09-11 07:13 AM
Hello
There is a bug in the current version of CubeMX using the L4 libs. The ''PLLSAI1ClockOut'' (and I assume the SAI2 one) isn't set within the generated SystemClock_Config function which leads to undefined behaviour within the function calls done by the clock configuration. Upon reaching line 1174 of stm32l4xx_hal_rcc_ex.c a macro writes the assumed value of PLLSAI1ClockOut to the whole PLLSAI1 configuration register and overwrites all settings already written. /edit code snippetPeriphClkInit.PLLSAI1.PLLSAI1N = 70;
PeriphClkInit.PLLSAI1.PLLSAI1P = RCC_PLLP_DIV17;
PeriphClkInit.PLLSAI1.PLLSAI1Q = RCC_PLLQ_DIV2;
PeriphClkInit.PLLSAI1.PLLSAI1R = RCC_PLLR_DIV8;
PeriphClkInit.PLLSAI1.PLLSAI1ClockOut = RCC_PLLSAI1_SAI1CLK; // missing line from CubeMX
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit);
2015-09-28 10:08 AM
Hi Vinci,
Thank you for your feedback. The issue has been reported internally.-Syrine-2015-10-11 11:55 AM
Dear user,
Please upgrade to 4.10.1. This issue has been fixed. Thank you