You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/10/22 14:03:23 UTC
[incubator-nuttx] 01/02: Added
ARCH_BOARD_STM32F0G0L0_CUSTOM_CLOCKCONFIG option to stm32f0/g0/l0 chip
configiuration
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit ed392abb83477b6efd7ae1abd7f56e9aeeb75c5f
Author: Alexander Oryshchenko <al...@ge.com>
AuthorDate: Tue Oct 19 17:42:55 2021 +0300
Added ARCH_BOARD_STM32F0G0L0_CUSTOM_CLOCKCONFIG option to stm32f0/g0/l0 chip configiuration
---
arch/arm/src/stm32f0l0g0/Kconfig | 6 ++++++
arch/arm/src/stm32f0l0g0/stm32_rcc.c | 8 ++++----
arch/arm/src/stm32f0l0g0/stm32f0_rcc.c | 2 +-
arch/arm/src/stm32f0l0g0/stm32g0_rcc.c | 2 +-
arch/arm/src/stm32f0l0g0/stm32l0_rcc.c | 2 +-
5 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/arch/arm/src/stm32f0l0g0/Kconfig b/arch/arm/src/stm32f0l0g0/Kconfig
index f12037a..2cf0d7e 100644
--- a/arch/arm/src/stm32f0l0g0/Kconfig
+++ b/arch/arm/src/stm32f0l0g0/Kconfig
@@ -927,6 +927,12 @@ config STM32F0L0G0_SYSTICK_CORECLK_DIV16
endchoice
+config ARCH_BOARD_STM32F0G0L0_CUSTOM_CLOCKCONFIG
+ bool "Custom clock configuration"
+ default n
+ ---help---
+ Enables special, board-specific STM32 clock configuration.
+
menu "STM32 Peripheral Support"
# These "hidden" settings determine whether a peripheral option is available
diff --git a/arch/arm/src/stm32f0l0g0/stm32_rcc.c b/arch/arm/src/stm32f0l0g0/stm32_rcc.c
index 6d4dfe3..584daee 100644
--- a/arch/arm/src/stm32f0l0g0/stm32_rcc.c
+++ b/arch/arm/src/stm32f0l0g0/stm32_rcc.c
@@ -139,7 +139,7 @@ static inline void rcc_resetbkp(void)
* and enable peripheral clocking for all peripherals enabled in the NuttX
* configuration file.
*
- * If CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is defined, then clocking
+ * If CONFIG_ARCH_BOARD_STM32F0G0L0_CUSTOM_CLOCKCONFIG is defined, then clocking
* will be enabled by an externally provided, board-specific function
* called stm32_board_clockconfig().
*
@@ -161,7 +161,7 @@ void stm32_clockconfig(void)
rcc_resetbkp();
-#if defined(CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG)
+#if defined(CONFIG_ARCH_BOARD_STM32F0G0L0_CUSTOM_CLOCKCONFIG)
/* Invoke Board Custom Clock Configuration */
stm32_board_clockconfig();
@@ -193,7 +193,7 @@ void stm32_clockconfig(void)
* stm32_clockconfig(): It does not reset any devices, and it does not
* reset the currently enabled peripheral clocks.
*
- * If CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is defined, then clocking
+ * If CONFIG_ARCH_BOARD_STM32F0G0L0_CUSTOM_CLOCKCONFIG is defined, then clocking
* will be enabled by an externally provided, board-specific function
* called stm32_board_clockconfig().
*
@@ -208,7 +208,7 @@ void stm32_clockconfig(void)
#ifdef CONFIG_PM
void stm32_clockenable(void)
{
-#if defined(CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG)
+#if defined(CONFIG_ARCH_BOARD_STM32F0G0L0_CUSTOM_CLOCKCONFIG)
/* Invoke Board Custom Clock Configuration */
stm32_board_clockconfig();
diff --git a/arch/arm/src/stm32f0l0g0/stm32f0_rcc.c b/arch/arm/src/stm32f0l0g0/stm32f0_rcc.c
index 6c41d10..5f409ea 100644
--- a/arch/arm/src/stm32f0l0g0/stm32f0_rcc.c
+++ b/arch/arm/src/stm32f0l0g0/stm32f0_rcc.c
@@ -418,7 +418,7 @@ static inline void rcc_enableapb2(void)
*
****************************************************************************/
-#ifndef CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG
+#ifndef CONFIG_ARCH_BOARD_STM32F0G0L0_CUSTOM_CLOCKCONFIG
static void stm32_stdclockconfig(void)
{
uint32_t regval;
diff --git a/arch/arm/src/stm32f0l0g0/stm32g0_rcc.c b/arch/arm/src/stm32f0l0g0/stm32g0_rcc.c
index b636441..b4a03bd 100644
--- a/arch/arm/src/stm32f0l0g0/stm32g0_rcc.c
+++ b/arch/arm/src/stm32f0l0g0/stm32g0_rcc.c
@@ -425,7 +425,7 @@ static inline bool stm32_rcc_enablehse(void)
*
****************************************************************************/
-#ifndef CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG
+#ifndef CONFIG_ARCH_BOARD_STM32F0G0L0_CUSTOM_CLOCKCONFIG
static void stm32_stdclockconfig(void)
{
uint32_t regval;
diff --git a/arch/arm/src/stm32f0l0g0/stm32l0_rcc.c b/arch/arm/src/stm32f0l0g0/stm32l0_rcc.c
index a39a96e..5f9300e 100644
--- a/arch/arm/src/stm32f0l0g0/stm32l0_rcc.c
+++ b/arch/arm/src/stm32f0l0g0/stm32l0_rcc.c
@@ -469,7 +469,7 @@ static inline bool stm32_rcc_enablehse(void)
*
****************************************************************************/
-#ifndef CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG
+#ifndef CONFIG_ARCH_BOARD_STM32F0G0L0_CUSTOM_CLOCKCONFIG
static void stm32_stdclockconfig(void)
{
uint32_t regval;