diff options
author | Damien George <damien.p.george@gmail.com> | 2020-01-31 23:23:56 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-01-31 23:25:18 +1100 |
commit | af88e70414061d868a248d1735f26e645d36844c (patch) | |
tree | 5cbd8e7788765c80e8277696246ead7253bb5c62 | |
parent | 2c8c2b935ee94091664781027ab2be9292446cb2 (diff) |
stm32/powerctrl: Reenable PLL3 on H7 MCUs when waking from stop mode.
So that USB can work.
-rw-r--r-- | ports/stm32/powerctrl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ports/stm32/powerctrl.c b/ports/stm32/powerctrl.c index 9619e0ea4..0b26e2aea 100644 --- a/ports/stm32/powerctrl.c +++ b/ports/stm32/powerctrl.c @@ -504,6 +504,13 @@ void powerctrl_enter_stop_mode(void) { } #endif + #if defined(STM32H7) + // Enable PLL3 for USB + RCC->CR |= RCC_CR_PLL3ON; + while (!(RCC->CR & RCC_CR_PLL3RDY)) { + } + #endif + #if defined(STM32L4) // Enable PLLSAI1 for peripherals that use it RCC->CR |= RCC_CR_PLLSAI1ON; |