cancel
Showing results for 
Search instead for 
Did you mean: 

What different ways are there to automatically wake up from sleep and stop mode.

NJong.1
Associate II

Example. The MCU should wake up automatically every 5 seconds. This is possible with the RTC.

But are there other ways to achieve this? (so not using the rtc?)

Timers don't seem to work because the clock is turned off. 

7 REPLIES 7
TDK
Guru

LPTIM works, among others. The answer will depend on your chip. All reference manuals go into detail about sleep and shutdown modes and list what is available.

If you feel a post has answered your question, please click "Accept as Solution".
NJong.1
Associate II

I am working with the STM32L073. It looks like in stop all the clocks are off so I tought it does not work. I also tested it.

But I will try to improve the code to make it work. Thank you

Piranha
Chief II

The sleep mode only stops a clock on CPU (state is retained). It doesn't impact peripherals at all and any interrupt wakes up the CPU.

Mohamed Aymen HZAMI
ST Employee

Hello,

To wake up the devise from low power mode there are several ways to do this :

  • RTC as automatic wake up each period of time
  • Using interrupts (internal or external interruptions depend on your needs).

Best Regards,

Mohamed Aymen.

NJong.1
Associate II

I have found the solution to my problem. Thank you for the tips.

Mohamed Aymen HZAMI
ST Employee

Hello,

Good, can you please share with us your solution to this ?

Thanks and Best Regards,

Mohamed Aymen.

NJong.1
Associate II

At first I was not sure if it was possible to keep an timer and intterupts running when de MCU goes in to sleep. But this is possible.

So its not really a solution where I can share the code.

I was hoping there was a way to wake up the MCU from stop when using a timer and interrupts, but thats not possible. Or I need to use an external interrupt or the RTC.