diff --git a/boards/nucleo-l452re/include/periph_conf.h b/boards/nucleo-l452re/include/periph_conf.h index d2cc8b80db..cd0765c2dc 100644 --- a/boards/nucleo-l452re/include/periph_conf.h +++ b/boards/nucleo-l452re/include/periph_conf.h @@ -26,6 +26,7 @@ #define PERIPH_CONF_H #include "periph_cpu.h" +#include "l4/cfg_clock_80_1.h" #include "cfg_rtt_default.h" #include "cfg_timer_tim2.h" @@ -33,60 +34,6 @@ extern "C" { #endif -/** - * @name Clock system configuration - * @{ - */ -/* 0: no external high speed crystal available - * else: actual crystal frequency [in Hz] */ -#define CLOCK_HSE (0) - -#ifndef CLOCK_LSE -/* 0: no external low speed crystal available, - * 1: external crystal available (always 32.768kHz) */ -#define CLOCK_LSE (0) -#endif - -/* 0: enable MSI only if HSE isn't available - * 1: always enable MSI (e.g. if USB or RNG is used)*/ -#define CLOCK_MSI_ENABLE (1) - -#ifndef CLOCK_MSI_LSE_PLL -/* 0: disable Hardware auto calibration with LSE - * 1: enable Hardware auto calibration with LSE (PLL-mode) - * Same as with CLOCK_LSE above this defaults to 0 because LSE is - * mandatory for MSI/LSE-trimming to work */ -#define CLOCK_MSI_LSE_PLL (0) -#endif - -/* give the target core clock (HCLK) frequency [in Hz], maximum: 80MHz */ -#define CLOCK_CORECLOCK (80000000U) -/* PLL configuration: make sure your values are legit! - * - * compute by: CORECLOCK = (((PLL_IN / M) * N) / R) - * with: - * PLL_IN: input clock, HSE or MSI @ 48MHz - * M: pre-divider, allowed range: [1:8] - * N: multiplier, allowed range: [8:86] - * R: post-divider, allowed range: [2,4,6,8] - * - * Also the following constraints need to be met: - * (PLL_IN / M) -> [4MHz:16MHz] - * (PLL_IN / M) * N -> [64MHz:344MHz] - * CORECLOCK -> 80MHz MAX! - */ -#define CLOCK_PLL_M (6) -#define CLOCK_PLL_N (20) -#define CLOCK_PLL_R (2) -/* peripheral clock setup */ -#define CLOCK_AHB_DIV RCC_CFGR_HPRE_DIV1 -#define CLOCK_AHB (CLOCK_CORECLOCK / 1) -#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV4 -#define CLOCK_APB1 (CLOCK_CORECLOCK / 4) -#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV2 -#define CLOCK_APB2 (CLOCK_CORECLOCK / 2) -/** @} */ - /** * @name UART configuration * @{