summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2021-09-15 23:14:07 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2021-09-15 23:14:07 +0200
commit9194e871a4590d1118f40ea8dbf1d34e45bc759c (patch)
tree4e014901f03defe35f4728846d54a9c6e56177b3
parent4b04cfeddcc8c9ea6c41128a904005bd6220b2fb (diff)
platforms: Improve STM32F42x support.
-rw-r--r--platforms/stm32/f4.yaml7
-rw-r--r--rcc/flash.cpp4
2 files changed, 9 insertions, 2 deletions
diff --git a/platforms/stm32/f4.yaml b/platforms/stm32/f4.yaml
index 5325d92..d2d8a28 100644
--- a/platforms/stm32/f4.yaml
+++ b/platforms/stm32/f4.yaml
@@ -12,6 +12,13 @@
origin: 0x08000000
size: 1M
+- match:
+ mem: i
+ mem:
+ flash:
+ origin: 0x08000000
+ size: 2M
+
- mem:
ram:
origin: 0x20000000
diff --git a/rcc/flash.cpp b/rcc/flash.cpp
index c20b618..0f46cf0 100644
--- a/rcc/flash.cpp
+++ b/rcc/flash.cpp
@@ -9,9 +9,9 @@ void flash_init() {
#elif defined(STM32F4)
// Set flash latency.
- FLASH.ACR = 0x105;
+ FLASH.ACR = 0x107;
- while(FLASH.ACR != 0x105);
+ while(FLASH.ACR != 0x107);
#elif defined(STM32F0) || defined(STM32L0)