Skip to main content
NJong.1
Associate II
May 1, 2020
Question

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

  • May 1, 2020
  • 7 replies
  • 1574 views

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. 

This topic has been closed for replies.

7 replies

TDK
May 1, 2020

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
NJong.1Author
Associate II
May 1, 2020

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
Principal III
May 2, 2020

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
May 3, 2020

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
NJong.1Author
Associate II
May 5, 2020

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

Mohamed Aymen HZAMI
ST Employee
May 5, 2020

Hello,

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

Thanks and Best Regards,

Mohamed Aymen.

NJong.1
NJong.1Author
Associate II
May 5, 2020

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.