kasjer opened a new pull request, #2864:
URL: https://github.com/apache/mynewt-core/pull/2864
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).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]