You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SystemInit disabled few bits in CR register before every clock was
configured. This allows to configure PLL.
If PLLI2S was enabled before this function was called (could happen
if I2S was enabled in bootloader) PLL source could not be changed.
ST HAL function HAL_RCC_OscConfig() expect this bit to be cleared.
Following code from HAL will not update PLLSRC bit if PLLI2S in enabled
during call to this function.
/* Configure the main PLL clock source, multiplication and division factors. */
WRITE_REG(RCC->PLLCFGR, (RCC_OscInitStruct->PLL.PLLSource | \
RCC_OscInitStruct->PLL.PLLM | \
(RCC_OscInitStruct->PLL.PLLN << RCC_PLLCFGR_PLLN_Pos) | \
(((RCC_OscInitStruct->PLL.PLLP >> 1U) - 1U) << RCC_PLLCFGR_PLLP_Pos) | \
(RCC_OscInitStruct->PLL.PLLQ << RCC_PLLCFGR_PLLQ_Pos)));
This clears PLLI2S bit in RCC_CR register to enable further configuration
of PLL from external oscillator (same bit is already cleared in L4 devices
in code provided by ST).
0 commit comments