mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:52:59 +01:00
boards/stm32l0: set LSE to 0 default, override in boards
This commit is contained in:
parent
23117a844e
commit
67a1c029b4
@ -19,6 +19,11 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* Add specific clock configuration (HSE, LSE) for this board here */
|
||||
#ifndef CONFIG_BOARD_HAS_LSE
|
||||
#define CONFIG_BOARD_HAS_LSE (1)
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_default.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
|
@ -87,7 +87,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_BOARD_HAS_LSE
|
||||
#define CONFIG_BOARD_HAS_LSE (1)
|
||||
#define CONFIG_BOARD_HAS_LSE (0)
|
||||
#endif
|
||||
#if CONFIG_BOARD_HAS_LSE
|
||||
#define CLOCK_LSE (1)
|
||||
|
@ -19,6 +19,11 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* Add specific clock configuration (HSE, LSE) for this board here */
|
||||
#ifndef CONFIG_BOARD_HAS_LSE
|
||||
#define CONFIG_BOARD_HAS_LSE (1)
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_default.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
|
@ -19,6 +19,11 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* Add specific clock configuration (HSE, LSE) for this board here */
|
||||
#ifndef CONFIG_BOARD_HAS_LSE
|
||||
#define CONFIG_BOARD_HAS_LSE (1)
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_default.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
|
@ -21,6 +21,11 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* Add specific clock configuration (HSE, LSE) for this board here */
|
||||
#ifndef CONFIG_BOARD_HAS_LSE
|
||||
#define CONFIG_BOARD_HAS_LSE (1)
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_default.h"
|
||||
#include "cfg_i2c1_pb6_pb7.h"
|
||||
|
@ -21,6 +21,11 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* Add specific clock configuration (HSE, LSE) for this board here */
|
||||
#ifndef CONFIG_BOARD_HAS_LSE
|
||||
#define CONFIG_BOARD_HAS_LSE (1)
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_default.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
|
@ -21,6 +21,11 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* Add specific clock configuration (HSE, LSE) for this board here */
|
||||
#ifndef CONFIG_BOARD_HAS_LSE
|
||||
#define CONFIG_BOARD_HAS_LSE (1)
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_default.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
|
@ -26,31 +26,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock system configuration
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_HSI (16000000U) /* internal oscillator */
|
||||
#define CLOCK_CORECLOCK (32000000U) /* desired core clock frequency */
|
||||
#define CLOCK_LSE (0) /* enable low speed external oscillator */
|
||||
|
||||
/* configuration of PLL prescaler and multiply values */
|
||||
/* CORECLOCK := HSI / CLOCK_PLL_DIV * CLOCK_PLL_MUL */
|
||||
#define CLOCK_PLL_DIV RCC_CFGR_PLLDIV2
|
||||
#define CLOCK_PLL_MUL RCC_CFGR_PLLMUL4
|
||||
/* configuration of peripheral bus clock prescalers */
|
||||
#define CLOCK_AHB_DIV RCC_CFGR_HPRE_DIV1 /* AHB clock -> 32MHz */
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1 /* APB2 clock -> 32MHz */
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV1 /* APB1 clock -> 32MHz */
|
||||
/* configuration of flash access cycles */
|
||||
#define CLOCK_FLASH_LATENCY FLASH_ACR_LATENCY
|
||||
|
||||
/* bus clocks for simplified peripheral initialization, UPDATE MANUALLY! */
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Timer configuration
|
||||
* @{
|
||||
|
Loading…
Reference in New Issue
Block a user