cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Sleep

SARTHAK KELAPURE
Associate II
Posted on January 29, 2018 at 13:02

What is the best way to put STM32L0 micro-controllers to sleep for limited time duration(preferably using RTC)?

#stm32l0 #stm32-sleep
10 REPLIES 10
Posted on January 29, 2018 at 13:14

There is no such thing as 'best' - it all depends on your particular requirements.

It is a tradeoff between

  • current consumption while in sleep;
  • functionality while in sleep;
  • available wakeup triggers;
  • time taken to 'wake up' from sleep;
  • amount of reconfiguration required to enter & exit sleep;
  • etc...
Posted on January 29, 2018 at 13:18

Well, in that case, I would like to wake the controller on an RTC timeout and would like to have low power consumption(not the least, functionality is priority). Is this possible?

Posted on January 29, 2018 at 13:41

So have you looked at the Datasheet and Reference Manual - they list & describe the available 'sleep' modes ...

The STM32L0x2 Reference Manual, at least, has code examples at the end ...

Posted on January 29, 2018 at 18:08

Pretty sure the LRWAN implementation is illustrative of the RTC being used as the primary timebase, placing the device into SLEEP state(s)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 29, 2018 at 18:19

Yes, it is - though rather a lot to wade through just for an example of SLEEP ... !!

:(

Posted on January 29, 2018 at 18:21

But the mechanics are at least fully explored. And the OP was using the LoRa L0 code previously.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 29, 2018 at 18:46

Even though my recent work has been on LoRa discovery board and on LoRa, I just wanted to know best possible way for STM32 controllers to go to sleep and wakeup. Also, right now I am still on LoRa stack and wish to best utilize the sleep options available.

Posted on January 29, 2018 at 18:54

Again, 'best' is meaningless - unless accompanied by a specific set of criteria by which to judge it.

If there was just one single 'best' option - why would the chip provide any others?