summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-01-30 16:30:03 +1100
committerDamien George <damien.p.george@gmail.com>2020-01-30 16:30:03 +1100
commit68db7e01d842b0b9b828be6e001e83f78de7a226 (patch)
tree28c6374e69a1d690f087a8fda12dbad9632463d0
parent29b84ea79856e8ba512ef7ea70b265e9d86e45b6 (diff)
stm32/powerctrl: Enable overdrive on F7 when waking from stop mode.
Because if the SYSCLK is set to 180MHz or higher it will require this to be on already.
-rw-r--r--ports/stm32/powerctrl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/stm32/powerctrl.c b/ports/stm32/powerctrl.c
index d1ac85f0e..4c40cffb6 100644
--- a/ports/stm32/powerctrl.c
+++ b/ports/stm32/powerctrl.c
@@ -381,6 +381,11 @@ void powerctrl_enter_stop_mode(void) {
}
#endif
+ #if defined(STM32F7)
+ // Enable overdrive to reach 216MHz (if needed)
+ HAL_PWREx_EnableOverDrive();
+ #endif
+
// enable PLL
__HAL_RCC_PLL_ENABLE();
while (!__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY)) {