diff options
| author | Andrew Leech <andrew.leech@planetinnovation.com.au> | 2022-02-23 13:06:44 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-03-08 14:03:36 +1100 |
| commit | c551723914ac5ce123216c1dd776bc4fdf25cc65 (patch) | |
| tree | 9328fcd77a9b7907d70d21ab6ab7272b74edfe93 /ports/stm32/powerctrl.c | |
| parent | 2eca86e8fa15e50bf9f928b1df6a925b49cdd142 (diff) | |
stm32/powerctrl: Disable WB55 BLE before entering deepsleep.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
Diffstat (limited to 'ports/stm32/powerctrl.c')
| -rw-r--r-- | ports/stm32/powerctrl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/stm32/powerctrl.c b/ports/stm32/powerctrl.c index 3439b0d1f..373f6b1ab 100644 --- a/ports/stm32/powerctrl.c +++ b/ports/stm32/powerctrl.c @@ -29,6 +29,7 @@ #include "powerctrl.h" #include "rtc.h" #include "genhdr/pllfreqtable.h" +#include "extmod/modbluetooth.h" #if defined(STM32H7) #define RCC_SR RSR @@ -947,6 +948,10 @@ void powerctrl_enter_standby_mode(void) { } #endif + #if defined(STM32WB) && MICROPY_PY_BLUETOOTH + mp_bluetooth_deinit(); + #endif + // We need to clear the PWR wake-up-flag before entering standby, since // the flag may have been set by a previous wake-up event. Furthermore, // we need to disable the wake-up sources while clearing this flag, so |
