2019-09-11 03:18 PM
Anyone aware of this problem and any workaround, other than manually changing the generated file? Specifically, RCC_OscInitStruct.PLL.PLLR, RCC_OscInitStruct.PLL.PLLP and
RCC_OscInitStruct.PLL.PLLR are not being configured correctly, causing the first call to HAL_GetTick() inside HAL_RCC_OscConfig() to crash.
2019-09-11 05:39 PM
For what STM32 part? Trying to narrow this down a bit.
Make sure SystemClock_Config() zeros out the local/auto variable.
2019-09-12 06:07 AM
Sorry Clive. It's the STM32G070CB. And to be more specific, these parameters were configured on the Clock Configuration Tab in Cube as:
RCC_OscInitStruct.PLL.PLLN = 9
RCC_OscInitStruct.PLL.PLLP = 3
RCC_OscInitStruct.PLL.PLLR = 3,
but the code generated:
RCC_OscInitStruct.PLL.PLLN = 8
RCC_OscInitStruct.PLL.PLLP = 2
RCC_OscInitStruct.PLL.PLLR = 2.
HOWEVER, in trying to pull this information together for you this morning, Cube generated the correct code this time. ??? I have been quite careful to save the project before generating code, but "Generate Code" saves the project anyway. So, I am not sure what is going on.
2019-09-25 07:24 AM
Resolved