I'm using Mbed coding on STM32L432KC nucleo board. I'm copying the code from the STM32 cube code examples to put my MCU in shutdown. See here.
The code compiles fine. I just added an LED blink inside the while (1) loop after the shutdown command to see if the MCU has wakeup up but it never blinks.
Any idea what I'm doing wrong?
-
1\$\begingroup\$ You should simplify the code which reproduces the issue to a bare minimum, then post it in your question. There's a high chance you'll find the issue yourself in the process. \$\endgroup\$Dmitry Grigoryev– Dmitry Grigoryev2019年02月13日 12:18:27 +00:00Commented Feb 13, 2019 at 12:18
1 Answer 1
Mbed OS 5.11 (latest release) will automatically put the MCU in deep sleep for you, no need to use the STM32 Cube examples. See the power management docs. You probably want to enable tickless mode as well, by adding MBED_TICKLESS=1
to the macros
section of mbed_app.json
.
If you need standby (no register retaining) mode, see https://github.com/janjongboom/stm32-standby-rtc-wakeup