mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 14:33:52 +01:00
stm32_common/stmclk: check if CLOCK_PLL_PREDIV is valid
This commit is contained in:
parent
26f3caf9d7
commit
21bbfbed1d
@ -225,6 +225,8 @@ void stmclk_init_sysclk(void)
|
||||
RCC->CFGR |= RCC_CFGR_PLLXTPRE; /* PREDIV == 2 */
|
||||
#elif CLOCK_PLL_PREDIV > 2
|
||||
RCC->CFGR2 = PLL_PREDIV; /* PREDIV > 2 */
|
||||
#elif CLOCK_PLL_PREDIV == 0
|
||||
#error "CLOCK_PLL_PREDIV invalid"
|
||||
#endif
|
||||
#endif
|
||||
RCC->CR |= (RCC_CR_PLLON);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user