From 6bb6b69bb6360cff11057ebef2a8b91cc3a91b3d Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 6 Apr 2021 09:43:23 +0200 Subject: 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(+) create mode 100644 spec/build/bsps/arm/stm32h7/opthse.yml diff --git a/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h b/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h index d423e4f782..3ad4e1e9a3 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 + +#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 2ee79d2760..1158fd9cb2 100644 --- a/spec/build/bsps/arm/stm32h7/grp.yml +++ b/spec/build/bsps/arm/stm32h7/grp.yml @@ -39,6 +39,8 @@ links: uid: optenusart3 - role: build-dependency uid: optenusart6 +- role: build-dependency + uid: opthse - role: build-dependency uid: optlinkcmds - role: build-dependency diff --git a/spec/build/bsps/arm/stm32h7/opthse.yml b/spec/build/bsps/arm/stm32h7/opthse.yml new file mode 100644 index 0000000000..51366932e1 --- /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) -- cgit v1.2.3