mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
boards/stm32f1: use shared default clock configuration
This commit is contained in:
parent
5cea49808a
commit
1b8460d68f
@ -1,3 +1,4 @@
|
||||
INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
||||
INCLUDES += -I$(RIOTBOARD)/common/blxxxpill/include
|
||||
|
||||
ifeq (dfu-util,$(PROGRAMMER))
|
||||
|
@ -24,41 +24,16 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* blxxxpill boards provide an LSE */
|
||||
#define CLOCK_LSE (1)
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f1f3/cfg_clock_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock settings
|
||||
*
|
||||
* @note This is auto-generated from
|
||||
* `cpu/stm32_common/dist/clk_conf/clk_conf.c`
|
||||
* @{
|
||||
*/
|
||||
/* give the target core clock (HCLK) frequency [in Hz],
|
||||
* maximum: 72MHz */
|
||||
#define CLOCK_CORECLOCK (72000000U)
|
||||
/* 0: no external high speed crystal available
|
||||
* else: actual crystal frequency [in Hz] */
|
||||
#define CLOCK_HSE (8000000U)
|
||||
/* 0: no external low speed crystal available,
|
||||
* 1: external crystal available (always 32.768kHz) */
|
||||
#define CLOCK_LSE (1U)
|
||||
/* peripheral clock setup */
|
||||
#define CLOCK_AHB_DIV RCC_CFGR_HPRE_DIV1
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV2 /* max 36MHz */
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1 /* max 72MHz */
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
|
||||
/* PLL factors */
|
||||
#define CLOCK_PLL_PREDIV (1)
|
||||
#define CLOCK_PLL_MUL (9)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Real time counter configuration
|
||||
* @{
|
||||
|
@ -1,3 +1,6 @@
|
||||
# Include shared STM32 headers
|
||||
INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
||||
|
||||
# define the default port depending on the host OS
|
||||
PORT_LINUX ?= /dev/ttyACM0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
|
@ -20,40 +20,12 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f1f3/cfg_clock_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock settings
|
||||
*
|
||||
* @note This is auto-generated from
|
||||
* `cpu/stm32_common/dist/clk_conf/clk_conf.c`
|
||||
* @{
|
||||
*/
|
||||
/* give the target core clock (HCLK) frequency [in Hz],
|
||||
* maximum: 72MHz */
|
||||
#define CLOCK_CORECLOCK (72000000U)
|
||||
/* 0: no external high speed crystal available
|
||||
* else: actual crystal frequency [in Hz] */
|
||||
#define CLOCK_HSE (8000000U)
|
||||
/* 0: no external low speed crystal available,
|
||||
* 1: external crystal available (always 32.768kHz) */
|
||||
#define CLOCK_LSE (0U)
|
||||
/* peripheral clock setup */
|
||||
#define CLOCK_AHB_DIV RCC_CFGR_HPRE_DIV1
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV2 /* max 36MHz */
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1 /* max 72MHz */
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
|
||||
/* PLL factors */
|
||||
#define CLOCK_PLL_PREDIV (1)
|
||||
#define CLOCK_PLL_MUL (9)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Timer configuration
|
||||
* @{
|
||||
|
@ -19,41 +19,16 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* This board provides an LSE */
|
||||
#define CLOCK_LSE (1)
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f1f3/cfg_clock_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock settings
|
||||
*
|
||||
* @note This is auto-generated from
|
||||
* `cpu/stm32_common/dist/clk_conf/clk_conf.c`
|
||||
* @{
|
||||
*/
|
||||
/* give the target core clock (HCLK) frequency [in Hz],
|
||||
* maximum: 72MHz */
|
||||
#define CLOCK_CORECLOCK (72000000U)
|
||||
/* 0: no external high speed crystal available
|
||||
* else: actual crystal frequency [in Hz] */
|
||||
#define CLOCK_HSE (8000000U)
|
||||
/* 0: no external low speed crystal available,
|
||||
* 1: external crystal available (always 32.768kHz) */
|
||||
#define CLOCK_LSE (1)
|
||||
/* peripheral clock setup */
|
||||
#define CLOCK_AHB_DIV RCC_CFGR_HPRE_DIV1
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV2 /* max 36MHz */
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1 /* max 72MHz */
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
|
||||
/* PLL factors */
|
||||
#define CLOCK_PLL_PREDIV (1)
|
||||
#define CLOCK_PLL_MUL (9)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Timer configuration
|
||||
* @{
|
||||
|
@ -19,41 +19,16 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* This board provides an LSE */
|
||||
#define CLOCK_LSE (1)
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f1f3/cfg_clock_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock settings
|
||||
*
|
||||
* @note This is auto-generated from
|
||||
* `cpu/stm32_common/dist/clk_conf/clk_conf.c`
|
||||
* @{
|
||||
*/
|
||||
/* give the target core clock (HCLK) frequency [in Hz],
|
||||
* maximum: 72MHz */
|
||||
#define CLOCK_CORECLOCK (72000000U)
|
||||
/* 0: no external high speed crystal available
|
||||
* else: actual crystal frequency [in Hz] */
|
||||
#define CLOCK_HSE (8000000U)
|
||||
/* 0: no external low speed crystal available,
|
||||
* 1: external crystal available (always 32.768kHz) */
|
||||
#define CLOCK_LSE (1)
|
||||
/* peripheral clock setup */
|
||||
#define CLOCK_AHB_DIV RCC_CFGR_HPRE_DIV1
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV2 /* max 36MHz */
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1 /* max 72MHz */
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
|
||||
/* PLL factors */
|
||||
#define CLOCK_PLL_PREDIV (1)
|
||||
#define CLOCK_PLL_MUL (9)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name ADC configuration
|
||||
* @{
|
||||
|
@ -1,3 +1,6 @@
|
||||
# Include shared STM32 headers
|
||||
INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
||||
|
||||
# define the default port depending on the host OS
|
||||
PORT_LINUX ?= /dev/ttyACM0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||
|
@ -20,40 +20,12 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f1f3/cfg_clock_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock settings
|
||||
*
|
||||
* @note This is auto-generated from
|
||||
* `cpu/stm32_common/dist/clk_conf/clk_conf.c`
|
||||
* @{
|
||||
*/
|
||||
/* give the target core clock (HCLK) frequency [in Hz],
|
||||
* maximum: 72MHz */
|
||||
#define CLOCK_CORECLOCK (72000000U)
|
||||
/* 0: no external high speed crystal available
|
||||
* else: actual crystal frequency [in Hz] */
|
||||
#define CLOCK_HSE (8000000U)
|
||||
/* 0: no external low speed crystal available,
|
||||
* 1: external crystal available (always 32.768kHz) */
|
||||
#define CLOCK_LSE (0U)
|
||||
/* peripheral clock setup */
|
||||
#define CLOCK_AHB_DIV RCC_CFGR_HPRE_DIV1
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV2 /* max 36MHz */
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1 /* max 72MHz */
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
|
||||
/* PLL factors */
|
||||
#define CLOCK_PLL_PREDIV (1)
|
||||
#define CLOCK_PLL_MUL (9)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Timer configuration
|
||||
* @{
|
||||
|
@ -1,3 +1,6 @@
|
||||
# Include shared STM32 headers
|
||||
INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
||||
|
||||
# configure the serial interface
|
||||
PORT_LINUX ?= /dev/ttyUSB0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
|
@ -20,40 +20,12 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f1f3/cfg_clock_default.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Clock settings
|
||||
*
|
||||
* @note This is auto-generated from
|
||||
* `cpu/stm32_common/dist/clk_conf/clk_conf.c`
|
||||
* @{
|
||||
*/
|
||||
/* give the target core clock (HCLK) frequency [in Hz],
|
||||
* maximum: 72MHz */
|
||||
#define CLOCK_CORECLOCK (72000000U)
|
||||
/* 0: no external high speed crystal available
|
||||
* else: actual crystal frequency [in Hz] */
|
||||
#define CLOCK_HSE (8000000U)
|
||||
/* 0: no external low speed crystal available,
|
||||
* 1: external crystal available (always 32.768kHz) */
|
||||
#define CLOCK_LSE (0U)
|
||||
/* peripheral clock setup */
|
||||
#define CLOCK_AHB_DIV RCC_CFGR_HPRE_DIV1
|
||||
#define CLOCK_AHB (CLOCK_CORECLOCK / 1)
|
||||
#define CLOCK_APB1_DIV RCC_CFGR_PPRE1_DIV2 /* max 36MHz */
|
||||
#define CLOCK_APB1 (CLOCK_CORECLOCK / 2)
|
||||
#define CLOCK_APB2_DIV RCC_CFGR_PPRE2_DIV1 /* max 72MHz */
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
|
||||
/* PLL factors */
|
||||
#define CLOCK_PLL_PREDIV (1)
|
||||
#define CLOCK_PLL_MUL (9)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Timer configuration
|
||||
* @{
|
||||
|
Loading…
Reference in New Issue
Block a user