[rtems commit] arm/stm32h7: Add STM32H7_HSE_FREQUENCY

Sebastian Huber sebh at rtems.org
Tue Apr 6 07:58:58 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Apr  6 09:43:23 2021 +0200

arm/stm32h7: Add STM32H7_HSE_FREQUENCY

---

 bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h |  5 +++++
 spec/build/bsps/arm/stm32h7/grp.yml           |  2 ++
 spec/build/bsps/arm/stm32h7/opthse.yml        | 20 ++++++++++++++++++++
 3 files changed, 27 insertions(+)

diff --git a/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h b/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h
index d423e4f..3ad4e1e 100644
--- a/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h
+++ b/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h
@@ -21,6 +21,11 @@
 #ifndef __STM32H7xx_HAL_CONF_H
 #define __STM32H7xx_HAL_CONF_H
 
+#ifdef __rtems__
+#include <bspopts.h>
+
+#define HSE_VALUE ((uint32_t)STM32H7_HSE_FREQUENCY)
+#endif /* __rtems__ */
 #ifdef __cplusplus
  extern "C" {
 #endif
diff --git a/spec/build/bsps/arm/stm32h7/grp.yml b/spec/build/bsps/arm/stm32h7/grp.yml
index 2ee79d2..1158fd9 100644
--- a/spec/build/bsps/arm/stm32h7/grp.yml
+++ b/spec/build/bsps/arm/stm32h7/grp.yml
@@ -40,6 +40,8 @@ links:
 - role: build-dependency
   uid: optenusart6
 - role: build-dependency
+  uid: opthse
+- role: build-dependency
   uid: optlinkcmds
 - role: build-dependency
   uid: optmemdtcmsz
diff --git a/spec/build/bsps/arm/stm32h7/opthse.yml b/spec/build/bsps/arm/stm32h7/opthse.yml
new file mode 100644
index 0000000..5136693
--- /dev/null
+++ b/spec/build/bsps/arm/stm32h7/opthse.yml
@@ -0,0 +1,20 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- get-integer: null
+- assert-uint32: null
+- format-and-define: null
+build-type: option
+default: 25000000
+default-by-variant:
+- value: 8000000
+  variants:
+  - arm/nucleo-h743zi
+enabled-by: true
+format: '{}'
+links: []
+name: STM32H7_HSE_FREQUENCY
+description: |
+  Frequency of the external high speed oscillator (HSE).
+type: build
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)



More information about the vc mailing list