diff options
Diffstat (limited to 'rcc/flash.cpp')
-rw-r--r-- | rcc/flash.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rcc/flash.cpp b/rcc/flash.cpp index 0f46cf0..e17b6a1 100644 --- a/rcc/flash.cpp +++ b/rcc/flash.cpp @@ -1,5 +1,8 @@ #include "flash.h" +/** + * Configure the flash for maximum speed access. + */ void flash_init() { #if defined(STM32F1) || defined(STM32F3) @@ -18,5 +21,9 @@ void flash_init() { // SET flash latency. FLASH.ACR = 1 << 0; + #elif defined(STM32WB) + // Prefetch and both caches, plus 3WS for 64MHz + FLASH.ACR = 0x700 | 3; + #endif } |