mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
boards/stm32f0: adapt to refactored clock configuration
This commit is contained in:
parent
6d76e61ff0
commit
665426fefc
@ -22,7 +22,14 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* This board provides an LSE */
|
||||
#define CLOCK_LSE (1)
|
||||
#ifndef CONFIG_BOARD_HAS_LSE
|
||||
#define CONFIG_BOARD_HAS_LSE 1
|
||||
#endif
|
||||
|
||||
/* This board provides an HSE */
|
||||
#ifndef CONFIG_BOARD_HAS_HSE
|
||||
#define CONFIG_BOARD_HAS_HSE 1
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f0/cfg_clock_default.h"
|
||||
|
@ -20,12 +20,13 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* No HSE available on this board */
|
||||
#define CLOCK_HSE (0U)
|
||||
|
||||
/* Adjust PLL factors when PLL is clocked by HSI */
|
||||
#define CLOCK_PLL_PREDIV (2)
|
||||
#define CLOCK_PLL_MUL (12)
|
||||
/* Adjust PLL factors:
|
||||
- On nucleo-f031k6, there's no HSE and PREDIV is hard-wired to 2
|
||||
- to reach 48MHz set PLL_MUL to 12 so core clock = (HSI8 / 2) * 12 = 48MHz */
|
||||
#define CONFIG_CLOCK_PLL_PREDIV (2)
|
||||
#ifndef CONFIG_CLOCK_PLL_MUL
|
||||
#define CONFIG_CLOCK_PLL_MUL (12)
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f0/cfg_clock_default.h"
|
||||
|
@ -19,12 +19,13 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* No HSE available on this board */
|
||||
#define CLOCK_HSE (0U)
|
||||
|
||||
/* Adjust PLL factors when PLL is clocked by HSI */
|
||||
#define CLOCK_PLL_PREDIV (2)
|
||||
#define CLOCK_PLL_MUL (12)
|
||||
/* Adjust PLL factors:
|
||||
- On nucleo-f042k6, there's no HSE and PREDIV is hard-wired to 2
|
||||
- to reach 48MHz set PLL_MUL to 12 so core clock = (HSI8 / 2) * 12 = 48MHz */
|
||||
#define CONFIG_CLOCK_PLL_PREDIV (2)
|
||||
#ifndef CONFIG_CLOCK_PLL_MUL
|
||||
#define CONFIG_CLOCK_PLL_MUL (12)
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f0/cfg_clock_default.h"
|
||||
|
@ -21,8 +21,15 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* HSE available on this board */
|
||||
#ifndef CONFIG_BOARD_HAS_HSE
|
||||
#define CONFIG_BOARD_HAS_HSE 1
|
||||
#endif
|
||||
|
||||
/* This board provides an LSE */
|
||||
#define CLOCK_LSE (1)
|
||||
#ifndef CONFIG_BOARD_HAS_LSE
|
||||
#define CONFIG_BOARD_HAS_LSE 1
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f0/cfg_clock_default.h"
|
||||
|
@ -20,8 +20,15 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* HSE available on this board */
|
||||
#ifndef CONFIG_BOARD_HAS_HSE
|
||||
#define CONFIG_BOARD_HAS_HSE 1
|
||||
#endif
|
||||
|
||||
/* This board provides an LSE */
|
||||
#define CLOCK_LSE (1)
|
||||
#ifndef CONFIG_BOARD_HAS_LSE
|
||||
#define CONFIG_BOARD_HAS_LSE 1
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f0/cfg_clock_default.h"
|
||||
|
@ -19,8 +19,15 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* HSE available on this board */
|
||||
#ifndef CONFIG_BOARD_HAS_HSE
|
||||
#define CONFIG_BOARD_HAS_HSE 1
|
||||
#endif
|
||||
|
||||
/* This board provides an LSE */
|
||||
#define CLOCK_LSE (1)
|
||||
#ifndef CONFIG_BOARD_HAS_LSE
|
||||
#define CONFIG_BOARD_HAS_LSE 1
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f0/cfg_clock_default.h"
|
||||
|
@ -22,6 +22,11 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* This board provides an HSE */
|
||||
#ifndef CONFIG_BOARD_HAS_HSE
|
||||
#define CONFIG_BOARD_HAS_HSE 1
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f0/cfg_clock_default.h"
|
||||
|
||||
|
@ -19,6 +19,11 @@
|
||||
#ifndef PERIPH_CONF_H
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
/* This board provides an HSE */
|
||||
#ifndef CONFIG_BOARD_HAS_HSE
|
||||
#define CONFIG_BOARD_HAS_HSE 1
|
||||
#endif
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "f0/cfg_clock_default.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user