2014-08-19 04:29 PM
SystemInit in my initialization calls SetSysClock that configures the PLL using the HSE with the default PLL values of my chip. SystemClock_Config generated by CubeMX calls HAL_RCC_OscConfig which attempts to do the same. However, since the PLL is already configured, the __HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL conditional evaluates to false (SWS[1:0] = 10 since the PLL is already selected), and the function returns HAL_ERROR instead of re-configuring the PLL.
Is that the intended behavior? I would have expected that if I provide a different PLL configuration in the RCC_OscInitTypeDef argument, the PLL would be configured again. Regards.2014-08-20 06:51 AM
This question should perhaps go to the dedicated ''software tools'' [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx]sub-forum.
JW