From 21bbfbed1d95dae1cc26f3cd2493ab2b63a68606 Mon Sep 17 00:00:00 2001 From: Vincent Dupont Date: Tue, 23 Jan 2018 11:49:13 +0100 Subject: [PATCH] stm32_common/stmclk: check if CLOCK_PLL_PREDIV is valid --- cpu/stm32_common/stmclk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpu/stm32_common/stmclk.c b/cpu/stm32_common/stmclk.c index 793c67167e..a7f5c03df9 100644 --- a/cpu/stm32_common/stmclk.c +++ b/cpu/stm32_common/stmclk.c @@ -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);