[rtems commit] bsps/stm32h7: fix propagation of configured HSE freq. value into the code

Karel Gardas karel at rtems.org
Fri Mar 10 15:01:34 UTC 2023


Module:    rtems
Branch:    master
Commit:    1a4e78b3a0ecc34346b38358a561ba3c7ff0fd39
Changeset: http://git.rtems.org/rtems/commit/?id=1a4e78b3a0ecc34346b38358a561ba3c7ff0fd39

Author:    Karel Gardas <karel at functional.vision>
Date:      Thu Mar  9 14:15:53 2023 +0100

bsps/stm32h7: fix propagation of configured HSE freq. value into the code

Sponsored-By:	Precidata

---

 bsps/arm/stm32h7/boards/stm/nucleo-h743zi/system_stm32h7xx.c    | 4 ++++
 bsps/arm/stm32h7/boards/stm/stm32h743i-eval/system_stm32h7xx.c  | 4 ++++
 bsps/arm/stm32h7/boards/stm/stm32h747i-disco/system_stm32h7xx.c | 6 ++++++
 bsps/arm/stm32h7/boards/stm/stm32h757i-eval/system_stm32h7xx.c  | 4 ++++
 bsps/arm/stm32h7/boards/stm/stm32h7b3i-dk/system_stm32h7xx.c    | 4 ++++
 5 files changed, 22 insertions(+)

diff --git a/bsps/arm/stm32h7/boards/stm/nucleo-h743zi/system_stm32h7xx.c b/bsps/arm/stm32h7/boards/stm/nucleo-h743zi/system_stm32h7xx.c
index a8a9ff0b4b..2d53f114c1 100644
--- a/bsps/arm/stm32h7/boards/stm/nucleo-h743zi/system_stm32h7xx.c
+++ b/bsps/arm/stm32h7/boards/stm/nucleo-h743zi/system_stm32h7xx.c
@@ -49,6 +49,10 @@
 #include <math.h>
 #ifdef __rtems__
 #include <bsp/linker-symbols.h>
+#include <bspopts.h>
+
+#define HSE_VALUE STM32H7_HSE_FREQUENCY
+
 #endif /* __rtems__ */
 #if !defined  (HSE_VALUE)
 #define HSE_VALUE    ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
diff --git a/bsps/arm/stm32h7/boards/stm/stm32h743i-eval/system_stm32h7xx.c b/bsps/arm/stm32h7/boards/stm/stm32h743i-eval/system_stm32h7xx.c
index a8a9ff0b4b..2d53f114c1 100644
--- a/bsps/arm/stm32h7/boards/stm/stm32h743i-eval/system_stm32h7xx.c
+++ b/bsps/arm/stm32h7/boards/stm/stm32h743i-eval/system_stm32h7xx.c
@@ -49,6 +49,10 @@
 #include <math.h>
 #ifdef __rtems__
 #include <bsp/linker-symbols.h>
+#include <bspopts.h>
+
+#define HSE_VALUE STM32H7_HSE_FREQUENCY
+
 #endif /* __rtems__ */
 #if !defined  (HSE_VALUE)
 #define HSE_VALUE    ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
diff --git a/bsps/arm/stm32h7/boards/stm/stm32h747i-disco/system_stm32h7xx.c b/bsps/arm/stm32h7/boards/stm/stm32h747i-disco/system_stm32h7xx.c
index 2dc9542597..269288d2c0 100644
--- a/bsps/arm/stm32h7/boards/stm/stm32h747i-disco/system_stm32h7xx.c
+++ b/bsps/arm/stm32h7/boards/stm/stm32h747i-disco/system_stm32h7xx.c
@@ -91,7 +91,13 @@
 
 #include "stm32h7xx.h"
 #include <math.h>
+#ifdef __rtems__
+#include <bsp/linker-symbols.h>
+#include <bspopts.h>
+
+#define HSE_VALUE STM32H7_HSE_FREQUENCY
 
+#endif /* __rtems__ */
 #if !defined  (HSE_VALUE)
 #define HSE_VALUE    ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
 #endif /* HSE_VALUE */
diff --git a/bsps/arm/stm32h7/boards/stm/stm32h757i-eval/system_stm32h7xx.c b/bsps/arm/stm32h7/boards/stm/stm32h757i-eval/system_stm32h7xx.c
index 1260694d8b..59e66e133e 100644
--- a/bsps/arm/stm32h7/boards/stm/stm32h757i-eval/system_stm32h7xx.c
+++ b/bsps/arm/stm32h7/boards/stm/stm32h757i-eval/system_stm32h7xx.c
@@ -93,6 +93,10 @@
 #include <math.h>
 #ifdef __rtems__
 #include <bsp/linker-symbols.h>
+#include <bspopts.h>
+
+#define HSE_VALUE STM32H7_HSE_FREQUENCY
+
 #endif /* __rtems__ */
 #if !defined  (HSE_VALUE)
 #define HSE_VALUE    ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
diff --git a/bsps/arm/stm32h7/boards/stm/stm32h7b3i-dk/system_stm32h7xx.c b/bsps/arm/stm32h7/boards/stm/stm32h7b3i-dk/system_stm32h7xx.c
index db11aa19b1..52e8eaafc4 100644
--- a/bsps/arm/stm32h7/boards/stm/stm32h7b3i-dk/system_stm32h7xx.c
+++ b/bsps/arm/stm32h7/boards/stm/stm32h7b3i-dk/system_stm32h7xx.c
@@ -48,6 +48,10 @@
 #include <math.h>
 #ifdef __rtems__
 #include <bsp/linker-symbols.h>
+#include <bspopts.h>
+
+#define HSE_VALUE STM32H7_HSE_FREQUENCY
+
 #endif /* __rtems__ */
 #if !defined  (HSE_VALUE)
 #define HSE_VALUE    ((uint32_t)24000000) /*!< Value of the External oscillator in Hz */



More information about the vc mailing list