From aaca1331ca45f5dc376586e55affe60976ea3bad Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 15 Dec 2020 23:12:06 +0100 Subject: [PATCH 1/4] cpu/fe310: move clock Kconfig to cpu --- cpu/fe310/Kconfig | 2 ++ cpu/fe310/Kconfig.clk | 53 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 cpu/fe310/Kconfig.clk diff --git a/cpu/fe310/Kconfig b/cpu/fe310/Kconfig index d1be703e52..dfa24f0061 100644 --- a/cpu/fe310/Kconfig +++ b/cpu/fe310/Kconfig @@ -64,3 +64,5 @@ config CPU_MODEL config CPU default "fe310" if CPU_FAM_FE310 + +rsource "Kconfig.clk" diff --git a/cpu/fe310/Kconfig.clk b/cpu/fe310/Kconfig.clk new file mode 100644 index 0000000000..9b5e6479c9 --- /dev/null +++ b/cpu/fe310/Kconfig.clk @@ -0,0 +1,53 @@ +# Copyright (c) 2020 Inria +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# + +menu "FE310 clock configuration" + depends on CPU_FAM_FE310 + +choice +bool "Clock source selection" +default USE_CLOCK_HFXOSC_PLL + +config USE_CLOCK_HFXOSC_PLL + bool "PLL clocked by high frequency external oscillator (HFXOSC)" + +config USE_CLOCK_HFXOSC + bool "Direct High frequency external oscillator (HFXOSC)" + +config USE_CLOCK_HFROSC_PLL + bool "PLL clocked by High frequency internal oscillator (HFROSC)" + +config USE_CLOCK_HFROSC + bool "Direct High frequency internal oscillator (HFROSC)" +endchoice + +# the configuration macros must always be defined for clock.c to compile +config CLOCK_PLL_F + int "F: REFR multiply factor" if USE_CLOCK_HFXOSC_PLL + default 39 + +config CLOCK_PLL_Q + int "Q: VCO divide factor" if USE_CLOCK_HFXOSC_PLL + default 1 + +config CLOCK_DESIRED_FREQUENCY + int + prompt "Desired clock frequency" if USE_CLOCK_HFROSC_PLL + default 320000000 + range 1000000 320000000 + +config CLOCK_HFROSC_TRIM + int "TRIM: input frequency multiplier" if USE_CLOCK_HFROSC + default 6 + range 0 31 + +config CLOCK_HFROSC_DIV + int "DIV: output frequency divider" if USE_CLOCK_HFROSC + default 1 + range 0 63 + +endmenu From f2fe6373be704e5d141c419bf5d340fbe777da7d Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 15 Dec 2020 23:12:25 +0100 Subject: [PATCH 2/4] boards/hifive1*: remove board level clock Kconfig --- boards/hifive1/Kconfig | 46 ---------------------------------------- boards/hifive1b/Kconfig | 47 ----------------------------------------- 2 files changed, 93 deletions(-) diff --git a/boards/hifive1/Kconfig b/boards/hifive1/Kconfig index 1486f45a3c..1f2f76d70a 100644 --- a/boards/hifive1/Kconfig +++ b/boards/hifive1/Kconfig @@ -17,49 +17,3 @@ config BOARD_HIFIVE1 select HAS_PERIPH_SPI select HAS_PERIPH_TIMER select HAS_PERIPH_UART - -menu "Hifive1 clock configuration" - depends on BOARD_HIFIVE1 - -choice -bool "Clock source selection" -default USE_CLOCK_HFXOSC_PLL - -config USE_CLOCK_HFXOSC_PLL - bool "PLL clocked by high frequency external oscillator (HFXOSC)" - -config USE_CLOCK_HFXOSC - bool "Direct High frequency external oscillator (HFXOSC)" - -config USE_CLOCK_HFROSC_PLL - bool "PLL clocked by High frequency internal oscillator (HFROSC)" - -config USE_CLOCK_HFROSC - bool "Direct High frequency internal oscillator (HFROSC)" -endchoice - -# the configuration macros must always be defined for clock.c to compile -config CLOCK_PLL_F - int "F: REFR multiply factor" if USE_CLOCK_HFXOSC_PLL - default 39 - -config CLOCK_PLL_Q - int "Q: VCO divide factor" if USE_CLOCK_HFXOSC_PLL - default 1 - -config CLOCK_DESIRED_FREQUENCY - int "Desired clock frequency" if USE_CLOCK_HFROSC_PLL - default 320000000 - range 1000000 320000000 - -config CLOCK_HFROSC_TRIM - int "TRIM: input frequency multiplier" if USE_CLOCK_HFROSC - default 6 - range 0 31 - -config CLOCK_HFROSC_DIV - int "DIV: output frequency divider" if USE_CLOCK_HFROSC - default 1 - range 0 63 - -endmenu diff --git a/boards/hifive1b/Kconfig b/boards/hifive1b/Kconfig index 5fb7b5cc2f..7c2f44c818 100644 --- a/boards/hifive1b/Kconfig +++ b/boards/hifive1b/Kconfig @@ -19,50 +19,3 @@ config BOARD_HIFIVE1B select HAS_PERIPH_TIMER select HAS_PERIPH_UART select HAS_ARDUINO - -menu "Hifive1b clock configuration" - depends on BOARD_HIFIVE1B - -choice -bool "Clock source selection" -default USE_CLOCK_HFXOSC_PLL - -config USE_CLOCK_HFXOSC_PLL - bool "PLL clocked by high frequency external oscillator (HFXOSC)" - -config USE_CLOCK_HFXOSC - bool "Direct High frequency external oscillator (HFXOSC)" - -config USE_CLOCK_HFROSC_PLL - bool "PLL clocked by High frequency internal oscillator (HFROSC)" - -config USE_CLOCK_HFROSC - bool "Direct High frequency internal oscillator (HFROSC)" -endchoice - -# the configuration macros must always be defined for clock.c to compile -config CLOCK_PLL_F - int "F: REFR multiply factor" if USE_CLOCK_HFXOSC_PLL - default 39 - -config CLOCK_PLL_Q - int "Q: VCO divide factor" if USE_CLOCK_HFXOSC_PLL - default 1 - -config CLOCK_DESIRED_FREQUENCY - int - prompt "Desired clock frequency" if USE_CLOCK_HFROSC_PLL - default 320000000 - range 1000000 320000000 - -config CLOCK_HFROSC_TRIM - int "TRIM: input frequency multiplier" if USE_CLOCK_HFROSC - default 6 - range 0 31 - -config CLOCK_HFROSC_DIV - int "DIV: output frequency divider" if USE_CLOCK_HFROSC - default 1 - range 0 63 - -endmenu From dc77914ce8b8c6cad9eaaadfabb582a2b08c46ab Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Wed, 16 Dec 2020 09:29:52 +0100 Subject: [PATCH 3/4] cpu/fe310: add clock configuration header --- cpu/fe310/include/clk_conf.h | 124 +++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 cpu/fe310/include/clk_conf.h diff --git a/cpu/fe310/include/clk_conf.h b/cpu/fe310/include/clk_conf.h new file mode 100644 index 0000000000..534053e5d8 --- /dev/null +++ b/cpu/fe310/include/clk_conf.h @@ -0,0 +1,124 @@ +/* + * Copyright (C) 2019-2020 Inria + * + * This file is subject to the terms and conditions of the GNU Lesser General + * Public License v2.1. See the file LICENSE in the top level directory for more + * details. + */ + +/** + * @ingroup cpu_fe310 + * @{ + * + * @file + * @brief Clock configuration for the FE310 cpu + * + * @author Alexandre Abadie + */ + +#ifndef CLK_CONF_H +#define CLK_CONF_H + +#include "macros/units.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @name Core Clock configuration + * @{ + */ +#ifndef CONFIG_USE_CLOCK_HFXOSC_PLL +#if IS_ACTIVE(CONFIG_USE_CLOCK_HFXOSC) || IS_ACTIVE(CONFIG_USE_CLOCK_HFROSC_PLL) || \ + IS_ACTIVE(CONFIG_USE_CLOCK_HFROSC) +#define CONFIG_USE_CLOCK_HFXOSC_PLL 0 +#else +#define CONFIG_USE_CLOCK_HFXOSC_PLL 1 /* Use PLL clocked by HFXOSC by default */ +#endif +#endif /* CONFIG_USE_CLOCK_HFXOSC_PLL */ + +#ifndef CONFIG_USE_CLOCK_HFXOSC +#define CONFIG_USE_CLOCK_HFXOSC 0 +#endif /* CONFIG_USE_CLOCK_HFXOSC */ + +#ifndef CONFIG_USE_CLOCK_HFROSC_PLL +#define CONFIG_USE_CLOCK_HFROSC_PLL 0 +#endif /* CONFIG_USE_CLOCK_HFROSC_PLL */ + +#ifndef CONFIG_USE_CLOCK_HFROSC +#define CONFIG_USE_CLOCK_HFROSC 0 +#endif /* CONFIG_USE_CLOCK_HFROSC */ + +#if CONFIG_USE_CLOCK_HFXOSC_PLL && \ + (CONFIG_USE_CLOCK_HFROSC_PLL || CONFIG_USE_CLOCK_HFROSC || CONFIG_USE_CLOCK_HFXOSC) +#error "Cannot use HFXOSC_PLL with other clock configurations" +#endif + +#if CONFIG_USE_CLOCK_HFXOSC && \ + (CONFIG_USE_CLOCK_HFROSC_PLL || CONFIG_USE_CLOCK_HFROSC || CONFIG_USE_CLOCK_HFXOSC_PLL) +#error "Cannot use HFXOSC with other clock configurations" +#endif + +#if CONFIG_USE_CLOCK_HFROSC_PLL && \ + (CONFIG_USE_CLOCK_HFXOSC_PLL || CONFIG_USE_CLOCK_HFXOSC || CONFIG_USE_CLOCK_HFROSC) +#error "Cannot use HFROSC_PLL with other clock configurations" +#endif + +#if CONFIG_USE_CLOCK_HFROSC && \ + (CONFIG_USE_CLOCK_HFXOSC_PLL || CONFIG_USE_CLOCK_HFXOSC || CONFIG_USE_CLOCK_HFROSC_PLL) +#error "Cannot use HFROSC with other clock configurations" +#endif + +#define CONFIG_CLOCK_PLL_R (1) /* Divide input clock by 2, mandatory with HFXOSC */ +#ifndef CONFIG_CLOCK_PLL_F +#define CONFIG_CLOCK_PLL_F (39) /* Multiply REFR by 80, e.g 2 * (39 + 1) */ +#endif +#ifndef CONFIG_CLOCK_PLL_Q +#define CONFIG_CLOCK_PLL_Q (1) /* Divide VCO by 2, e.g 2^1 */ +#endif + +#if CONFIG_USE_CLOCK_HFXOSC_PLL +#define CLOCK_PLL_INPUT_CLOCK MHZ(16) +#define CLOCK_PLL_REFR (CLOCK_PLL_INPUT_CLOCK / (CONFIG_CLOCK_PLL_R + 1)) +#define CLOCK_PLL_VCO (CLOCK_PLL_REFR * (2 * (CONFIG_CLOCK_PLL_F + 1))) +#define CLOCK_PLL_OUT (CLOCK_PLL_VCO / (1 << CONFIG_CLOCK_PLL_Q)) +#define CLOCK_CORECLOCK (CLOCK_PLL_OUT) /* 320000000Hz with the values used above */ + +/* Check PLL settings */ +#if CLOCK_PLL_REFR != MHZ(8) +#error "Only R=2 can be used when using HFXOSC" +#endif +#if (CLOCK_PLL_VCO < MHZ(384)) || (CLOCK_PLL_VCO > MHZ(768)) +#error "VCO frequency must be in the range [384MHz - 768MHz], check the CLOCK_PLL_F value" +#endif +#if (CLOCK_PLL_OUT < MHZ(48)) || (CLOCK_PLL_OUT > MHZ(384)) +#error "PLL output frequency must be in the range [48MHz - 384MHz], check the CLOCK_PLL_Q value" +#endif + +#elif CONFIG_USE_CLOCK_HFXOSC +#define CLOCK_CORECLOCK MHZ(16) +#endif + +/* + When using HFROSC input clock, the core clock cannot be computed from settings, + call cpu_freq() to get the configured CPU frequency. +*/ +#ifndef CONFIG_CLOCK_DESIRED_FREQUENCY +#define CONFIG_CLOCK_DESIRED_FREQUENCY MHZ(320) +#endif + +#ifndef CONFIG_CLOCK_HFROSC_TRIM +#define CONFIG_CLOCK_HFROSC_TRIM (6) /* ~72000000Hz input freq */ +#endif +#ifndef CONFIG_CLOCK_HFROSC_DIV +#define CONFIG_CLOCK_HFROSC_DIV (1) /* Divide by 2 */ +#endif +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif /* CLK_CONF_H */ +/** @} */ From 0a45ac5fa16b204996139cf02bd6a4cf585fab24 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Wed, 16 Dec 2020 09:30:07 +0100 Subject: [PATCH 4/4] boards/hifive1*: use common clock configuration --- boards/hifive1/include/periph_conf.h | 92 +-------------------------- boards/hifive1b/include/periph_conf.h | 92 +-------------------------- 2 files changed, 2 insertions(+), 182 deletions(-) diff --git a/boards/hifive1/include/periph_conf.h b/boards/hifive1/include/periph_conf.h index c9fea46e8f..0315e14b02 100644 --- a/boards/hifive1/include/periph_conf.h +++ b/boards/hifive1/include/periph_conf.h @@ -21,102 +21,12 @@ #define PERIPH_CONF_H #include "periph_cpu.h" +#include "clk_conf.h" #ifdef __cplusplus extern "C" { #endif -/** - * @name Core Clock configuration - * @{ - */ -#ifndef CONFIG_USE_CLOCK_HFXOSC_PLL -#if IS_ACTIVE(CONFIG_USE_CLOCK_HFXOSC) || IS_ACTIVE(CONFIG_USE_CLOCK_HFROSC_PLL) || \ - IS_ACTIVE(CONFIG_USE_CLOCK_HFROSC) -#define CONFIG_USE_CLOCK_HFXOSC_PLL 0 -#else -#define CONFIG_USE_CLOCK_HFXOSC_PLL 1 /* Use PLL clocked by HFXOSC by default */ -#endif -#endif /* CONFIG_USE_CLOCK_HFXOSC_PLL */ - -#ifndef CONFIG_USE_CLOCK_HFXOSC -#define CONFIG_USE_CLOCK_HFXOSC 0 -#endif /* CONFIG_USE_CLOCK_HFXOSC */ - -#ifndef CONFIG_USE_CLOCK_HFROSC_PLL -#define CONFIG_USE_CLOCK_HFROSC_PLL 0 -#endif /* CONFIG_USE_CLOCK_HFROSC_PLL */ - -#ifndef CONFIG_USE_CLOCK_HFROSC -#define CONFIG_USE_CLOCK_HFROSC 0 -#endif /* CONFIG_USE_CLOCK_HFROSC */ - -#if CONFIG_USE_CLOCK_HFXOSC_PLL && \ - (CONFIG_USE_CLOCK_HFROSC_PLL || CONFIG_USE_CLOCK_HFROSC || CONFIG_USE_CLOCK_HFXOSC) -#error "Cannot use HFXOSC_PLL with other clock configurations" -#endif - -#if CONFIG_USE_CLOCK_HFXOSC && \ - (CONFIG_USE_CLOCK_HFROSC_PLL || CONFIG_USE_CLOCK_HFROSC || CONFIG_USE_CLOCK_HFXOSC_PLL) -#error "Cannot use HFXOSC with other clock configurations" -#endif - -#if CONFIG_USE_CLOCK_HFROSC_PLL && \ - (CONFIG_USE_CLOCK_HFXOSC_PLL || CONFIG_USE_CLOCK_HFXOSC || CONFIG_USE_CLOCK_HFROSC) -#error "Cannot use HFROSC_PLL with other clock configurations" -#endif - -#if CONFIG_USE_CLOCK_HFROSC && \ - (CONFIG_USE_CLOCK_HFXOSC_PLL || CONFIG_USE_CLOCK_HFXOSC || CONFIG_USE_CLOCK_HFROSC_PLL) -#error "Cannot use HFROSC with other clock configurations" -#endif - -#define CONFIG_CLOCK_PLL_R (1) /* Divide input clock by 2, mandatory with HFXOSC */ -#ifndef CONFIG_CLOCK_PLL_F -#define CONFIG_CLOCK_PLL_F (39) /* Multiply REFR by 80, e.g 2 * (39 + 1) */ -#endif -#ifndef CONFIG_CLOCK_PLL_Q -#define CONFIG_CLOCK_PLL_Q (1) /* Divide VCO by 2, e.g 2^1 */ -#endif - -#if CONFIG_USE_CLOCK_HFXOSC_PLL -#define CLOCK_PLL_INPUT_CLOCK MHZ(16) -#define CLOCK_PLL_REFR (CLOCK_PLL_INPUT_CLOCK / (CONFIG_CLOCK_PLL_R + 1)) -#define CLOCK_PLL_VCO (CLOCK_PLL_REFR * (2 * (CONFIG_CLOCK_PLL_F + 1))) -#define CLOCK_PLL_OUT (CLOCK_PLL_VCO / (1 << CONFIG_CLOCK_PLL_Q)) -#define CLOCK_CORECLOCK (CLOCK_PLL_OUT) /* 320000000Hz with the values used above */ - -/* Check PLL settings */ -#if CLOCK_PLL_REFR != MHZ(8) -#error "Only R=2 can be used when using HFXOSC" -#endif -#if (CLOCK_PLL_VCO < MHZ(384)) || (CLOCK_PLL_VCO > MHZ(768)) -#error "VCO frequency must be in the range [384MHz - 768MHz], check the CLOCK_PLL_F value" -#endif -#if (CLOCK_PLL_OUT < MHZ(48)) || (CLOCK_PLL_OUT > MHZ(384)) -#error "PLL output frequency must be in the range [48MHz - 384MHz], check the CLOCK_PLL_Q value" -#endif - -#elif CONFIG_USE_CLOCK_HFXOSC -#define CLOCK_CORECLOCK MHZ(16) -#endif - -/* - When using HFROSC input clock, the core clock cannot be computed from settings, - call cpu_freq() to get the configured CPU frequency. -*/ -#ifndef CONFIG_CLOCK_DESIRED_FREQUENCY -#define CONFIG_CLOCK_DESIRED_FREQUENCY MHZ(320) -#endif - -#ifndef CONFIG_CLOCK_HFROSC_TRIM -#define CONFIG_CLOCK_HFROSC_TRIM (6) /* ~72000000Hz input freq */ -#endif -#ifndef CONFIG_CLOCK_HFROSC_DIV -#define CONFIG_CLOCK_HFROSC_DIV (1) /* Divide by 2 */ -#endif -/** @} */ - /** * @name Timer configuration * diff --git a/boards/hifive1b/include/periph_conf.h b/boards/hifive1b/include/periph_conf.h index e6535a685e..e1b1e1c8b0 100644 --- a/boards/hifive1b/include/periph_conf.h +++ b/boards/hifive1b/include/periph_conf.h @@ -22,102 +22,12 @@ #define PERIPH_CONF_H #include "periph_cpu.h" +#include "clk_conf.h" #ifdef __cplusplus extern "C" { #endif -/** - * @name Core Clock configuration - * @{ - */ -#ifndef CONFIG_USE_CLOCK_HFXOSC_PLL -#if IS_ACTIVE(CONFIG_USE_CLOCK_HFXOSC) || IS_ACTIVE(CONFIG_USE_CLOCK_HFROSC_PLL) || \ - IS_ACTIVE(CONFIG_USE_CLOCK_HFROSC) -#define CONFIG_USE_CLOCK_HFXOSC_PLL 0 -#else -#define CONFIG_USE_CLOCK_HFXOSC_PLL 1 /* Use PLL clocked by HFXOSC by default */ -#endif -#endif /* CONFIG_USE_CLOCK_HFXOSC_PLL */ - -#ifndef CONFIG_USE_CLOCK_HFXOSC -#define CONFIG_USE_CLOCK_HFXOSC 0 -#endif /* CONFIG_USE_CLOCK_HFXOSC */ - -#ifndef CONFIG_USE_CLOCK_HFROSC_PLL -#define CONFIG_USE_CLOCK_HFROSC_PLL 0 -#endif /* CONFIG_USE_CLOCK_HFROSC_PLL */ - -#ifndef CONFIG_USE_CLOCK_HFROSC -#define CONFIG_USE_CLOCK_HFROSC 0 -#endif /* CONFIG_USE_CLOCK_HFROSC */ - -#if CONFIG_USE_CLOCK_HFXOSC_PLL && \ - (CONFIG_USE_CLOCK_HFROSC_PLL || CONFIG_USE_CLOCK_HFROSC || CONFIG_USE_CLOCK_HFXOSC) -#error "Cannot use HFXOSC_PLL with other clock configurations" -#endif - -#if CONFIG_USE_CLOCK_HFXOSC && \ - (CONFIG_USE_CLOCK_HFROSC_PLL || CONFIG_USE_CLOCK_HFROSC || CONFIG_USE_CLOCK_HFXOSC_PLL) -#error "Cannot use HFXOSC with other clock configurations" -#endif - -#if CONFIG_USE_CLOCK_HFROSC_PLL && \ - (CONFIG_USE_CLOCK_HFXOSC_PLL || CONFIG_USE_CLOCK_HFXOSC || CONFIG_USE_CLOCK_HFROSC) -#error "Cannot use HFROSC_PLL with other clock configurations" -#endif - -#if CONFIG_USE_CLOCK_HFROSC && \ - (CONFIG_USE_CLOCK_HFXOSC_PLL || CONFIG_USE_CLOCK_HFXOSC || CONFIG_USE_CLOCK_HFROSC_PLL) -#error "Cannot use HFROSC with other clock configurations" -#endif - -#define CONFIG_CLOCK_PLL_R (1) /* Divide input clock by 2, mandatory with HFXOSC */ -#ifndef CONFIG_CLOCK_PLL_F -#define CONFIG_CLOCK_PLL_F (39) /* Multiply REFR by 80, e.g 2 * (39 + 1) */ -#endif -#ifndef CONFIG_CLOCK_PLL_Q -#define CONFIG_CLOCK_PLL_Q (1) /* Divide VCO by 2, e.g 2^1 */ -#endif - -#if CONFIG_USE_CLOCK_HFXOSC_PLL -#define CLOCK_PLL_INPUT_CLOCK MHZ(16) -#define CLOCK_PLL_REFR (CLOCK_PLL_INPUT_CLOCK / (CONFIG_CLOCK_PLL_R + 1)) -#define CLOCK_PLL_VCO (CLOCK_PLL_REFR * (2 * (CONFIG_CLOCK_PLL_F + 1))) -#define CLOCK_PLL_OUT (CLOCK_PLL_VCO / (1 << CONFIG_CLOCK_PLL_Q)) -#define CLOCK_CORECLOCK (CLOCK_PLL_OUT) /* 320000000Hz with the values used above */ - -/* Check PLL settings */ -#if CLOCK_PLL_REFR != MHZ(8) -#error "Only R=2 can be used when using HFXOSC" -#endif -#if (CLOCK_PLL_VCO < MHZ(384)) || (CLOCK_PLL_VCO > MHZ(768)) -#error "VCO frequency must be in the range [384MHz - 768MHz], check the CLOCK_PLL_F value" -#endif -#if (CLOCK_PLL_OUT < MHZ(48)) || (CLOCK_PLL_OUT > MHZ(384)) -#error "PLL output frequency must be in the range [48MHz - 384MHz], check the CLOCK_PLL_Q value" -#endif - -#elif CONFIG_USE_CLOCK_HFXOSC -#define CLOCK_CORECLOCK MHZ(16) -#endif - -/* - When using HFROSC input clock, the core clock cannot be computed from settings, - call cpu_freq() to get the configured CPU frequency. -*/ -#ifndef CONFIG_CLOCK_DESIRED_FREQUENCY -#define CONFIG_CLOCK_DESIRED_FREQUENCY MHZ(320) -#endif - -#ifndef CONFIG_CLOCK_HFROSC_TRIM -#define CONFIG_CLOCK_HFROSC_TRIM (6) /* ~72000000Hz input freq */ -#endif -#ifndef CONFIG_CLOCK_HFROSC_DIV -#define CONFIG_CLOCK_HFROSC_DIV (1) /* Divide by 2 */ -#endif -/** @} */ - /** * @name Timer configuration *