mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #11896 from fjmolinas/pr_stm32l4_stmclk_hsemsi
cpu/stm32l4/stmclk: fix HSE overwrite when MSI is enabled
This commit is contained in:
commit
bd576e7839
@ -133,7 +133,7 @@ void stmclk_init_sysclk(void)
|
||||
|
||||
#if ((CLOCK_HSE == 0) || CLOCK_MSI_ENABLE)
|
||||
/* reset clock to MSI with 48MHz, disables all other clocks */
|
||||
RCC->CR = (RCC_CR_MSIRANGE_11 | RCC_CR_MSION | RCC_CR_MSIRGSEL);
|
||||
RCC->CR |= (RCC_CR_MSIRANGE_11 | RCC_CR_MSION | RCC_CR_MSIRGSEL);
|
||||
while (!(RCC->CR & RCC_CR_MSIRDY)) {}
|
||||
/* select the MSI clock for the 48MHz clock tree (USB, RNG) */
|
||||
RCC->CCIPR = (RCC_CCIPR_CLK48SEL_0 | RCC_CCIPR_CLK48SEL_1);
|
||||
|
Loading…
Reference in New Issue
Block a user