2025-08-26 5:56 PM
Hello,
The target MCU is STM32L151ZETx (LQFP144), and the main clock frequency is 32 MHz.
Normally, the system operates in Run mode, but I plan to use Sleep mode or Low Power Sleep mode when the supply current decreases.
My question is: when entering Sleep mode or Low Power Sleep mode and then returning to Run mode, is it possible to resume execution from the exact code line (or position) where it was before entering Sleep mode, without requiring clock setup or any additional operation?
Thank you.
Solved! Go to Solution.
2025-08-26 7:11 PM
Both Sleep and LP Sleep will wake up on the next line of code after you send them to sleep. LP Sleep has system clock requirements. If you always run at those levels, no need to reconfigure clock after wake up.
See "5.3.5 Sleep mode" in the Reference Manual.
2025-08-26 7:11 PM
Both Sleep and LP Sleep will wake up on the next line of code after you send them to sleep. LP Sleep has system clock requirements. If you always run at those levels, no need to reconfigure clock after wake up.
See "5.3.5 Sleep mode" in the Reference Manual.
2025-08-26 7:50 PM
Thank you, your answer was very helpful.