1
0
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:
Vincent Dupont 2018-01-23 11:49:13 +01:00
parent 26f3caf9d7
commit 21bbfbed1d

View File

@ -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);