mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/stm32l0: use shared clock configuration
This commit is contained in:
parent
d6689103ef
commit
9849010309
@ -20,37 +20,13 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_32_16_1.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock system configuration
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_HSI (16000000U) /* internal oscillator */
|
||||
#define CLOCK_CORECLOCK (32000000U) /* desired core clock frequency */
|
||||
#define CLOCK_LSE (1) /* 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 DMA streams configuration
|
||||
* @{
|
||||
|
@ -20,37 +20,13 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_32_16_1.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock system configuration
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_HSI (16000000U) /* internal oscillator */
|
||||
#define CLOCK_CORECLOCK (32000000U) /* desired core clock frequency */
|
||||
#define CLOCK_LSE (1) /* 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
|
||||
* @{
|
||||
|
@ -20,37 +20,13 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_32_16_1.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock system configuration
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_HSI (16000000U) /* internal oscillator */
|
||||
#define CLOCK_CORECLOCK (32000000U) /* desired core clock frequency */
|
||||
#define CLOCK_LSE (1) /* 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 DMA streams configuration
|
||||
* @{
|
||||
|
@ -24,37 +24,13 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_32_16_1.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock system configuration
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_HSI (16000000U) /* internal oscillator */
|
||||
#define CLOCK_CORECLOCK (32000000U) /* desired core clock frequency */
|
||||
#define CLOCK_LSE (1) /* 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
|
||||
* @{
|
||||
|
@ -24,37 +24,13 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_32_16_1.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock system configuration
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_HSI (16000000U) /* internal oscillator */
|
||||
#define CLOCK_CORECLOCK (32000000U) /* desired core clock frequency */
|
||||
#define CLOCK_LSE (1) /* 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
|
||||
* @{
|
||||
|
@ -24,37 +24,13 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "l0/cfg_clock_32_16_1.h"
|
||||
#include "cfg_rtt_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock system configuration
|
||||
* @{
|
||||
*/
|
||||
#define CLOCK_HSI (16000000U) /* internal oscillator */
|
||||
#define CLOCK_CORECLOCK (32000000U) /* desired core clock frequency */
|
||||
#define CLOCK_LSE (1) /* 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