aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/STM32H7xx/hal_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/STM32H7xx/hal_lld.c')
-rw-r--r--os/hal/ports/STM32/STM32H7xx/hal_lld.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/STM32H7xx/hal_lld.c b/os/hal/ports/STM32/STM32H7xx/hal_lld.c
index df3e2f478..a474eb00e 100644
--- a/os/hal/ports/STM32/STM32H7xx/hal_lld.c
+++ b/os/hal/ports/STM32/STM32H7xx/hal_lld.c
@@ -368,6 +368,9 @@ void stm32_clock_init(void) {
/* Flash setup.*/
FLASH->ACR = FLASH_ACR_WRHIGHFREQ_2 | STM32_FLASHBITS;
+ while ((FLASH->ACR & FLASH_ACR_LATENCY) !=
+ (STM32_FLASHBITS & FLASH_ACR_LATENCY)) {
+ }
/* Switching to the configured clock source if it is different
from HSI.*/