2021-07-27 03:14 AM
2021-07-27 03:42 AM
Read the "Low power modes" subchapter of PWR chapter in RM.
You can simply use the __WFI(); intrinsic go to to sleep, any interrupt will wake up.
JW
2021-07-27 04:04 AM
thank you so much, but is it possible to use timers to wake the micro?
2021-07-27 04:46 AM
Of course!
Any interrupt can wake up from WFI. If you configure the timer to generate an interrupt, it will wake up the MCU.
2021-07-27 07:25 AM
Hello @Fghas.1,
You can refer to the examples provides by the STM32CubeF4 package.
As an example, the project under the "STM32Cube_FW_F4_V.XX\Projects\STM32F411E-Discovery\Examples\PWR\PWR_CurrentConsumption" path can help you configure the sleep mode and use the RTC configuration to set the timer to wake up from the low power mode.
Chahinez.