[PATCH 05/14] bsp/stm32h7: add flash latency configuration

Karel Gardas karel at functional.vision
Fri Apr 1 16:14:12 UTC 2022


---
 bsps/arm/stm32h7/start/stm32h7-config-fls.c   |  2 +-
 spec/build/bsps/arm/stm32h7/grp.yml           |  2 ++
 .../bsps/arm/stm32h7/optmemflashlatency.yml   | 19 +++++++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 spec/build/bsps/arm/stm32h7/optmemflashlatency.yml

diff --git a/bsps/arm/stm32h7/start/stm32h7-config-fls.c b/bsps/arm/stm32h7/start/stm32h7-config-fls.c
index f2d10d2410..9fe056f24d 100644
--- a/bsps/arm/stm32h7/start/stm32h7-config-fls.c
+++ b/bsps/arm/stm32h7/start/stm32h7-config-fls.c
@@ -31,4 +31,4 @@
 
 #include <stm32h7/hal.h>
 
-const uint32_t stm32h7_config_flash_latency = FLASH_LATENCY_4;
+const uint32_t stm32h7_config_flash_latency = STM32H7_FLASH_LATENCY;
diff --git a/spec/build/bsps/arm/stm32h7/grp.yml b/spec/build/bsps/arm/stm32h7/grp.yml
index e3b44d9593..7cb8f698cc 100644
--- a/spec/build/bsps/arm/stm32h7/grp.yml
+++ b/spec/build/bsps/arm/stm32h7/grp.yml
@@ -49,6 +49,8 @@ links:
   uid: optmemdtcmsz
 - role: build-dependency
   uid: optmemflashsz
+- role: build-dependency
+  uid: optmemflashlatency
 - role: build-dependency
   uid: optmemitcmsz
 - role: build-dependency
diff --git a/spec/build/bsps/arm/stm32h7/optmemflashlatency.yml b/spec/build/bsps/arm/stm32h7/optmemflashlatency.yml
new file mode 100644
index 0000000000..cf5422acb6
--- /dev/null
+++ b/spec/build/bsps/arm/stm32h7/optmemflashlatency.yml
@@ -0,0 +1,19 @@
+actions:
+- get-string: null
+- define-unquoted: null
+build-type: option
+default: FLASH_LATENCY_4
+default-by-variant:
+- value: FLASH_LATENCY_6
+  variants:
+  - arm/stm32h7b3i-dk
+enabled-by: true
+format: '{}'
+links: []
+name: STM32H7_FLASH_LATENCY
+description: |
+  Internal Flash latency
+type: build
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2022 Karel Gardas <karel at functional.vision>
-- 
2.25.1



More information about the devel mailing list