Skip to main content
Isaac Fróes
Associate II
May 4, 2021
Solved

STM32L0 - How do I now how much time the board stayed in standby mode?

I'm working with the SMT32l072 and in my application the board runs the main routine them it stays in standby until the RTC Timer (5 minutes) or the RTC Tamper detection (A sensor that pulls down the pin) wakes the board. The thing is that when the board wakes by the tamper I need, after processes some data, to put it back to sleep for the remaining time in the RTC Wake up timer. But I can't figure out how to do it, Anyone can give me a hand?

This topic has been closed for replies.
TDK
TDKBest answer
May 4, 2021

Save the RTC timestamp prior to going into standby mode and read it again upon exiting.

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

6 replies

TDK
TDKBest answer
May 4, 2021

Save the RTC timestamp prior to going into standby mode and read it again upon exiting.

"If you feel a post has answered your question, please click ""Accept as Solution""."
gordon239955_st
Associate III
July 25, 2021

This may help.

On a lot of microprocessors you can see the 'running' activity on the supply line as 'fuzz' and idle as quiet.

I don't know if that words with the ARM and/or STM32L0xx ... it was partly my attempt to do that that made me see that I have _huge_ ripple on the supply line, but I can't presently see why.

That certainly isn't working on my L081.

Uwe Bonnes' answer certainly does. There's a lot to be said for driving such a pin permanently and possibly adding an LED to it, much as one might do for comms to show messages passing.

Uwe Bonnes
Chief
July 26, 2021

Set/reset a pin on standby entry/exit and look with a scope.

Isaac Fróes
Associate II
July 26, 2021

That would not work. The device had to know the time by itself.

Uwe Bonnes
Chief
July 26, 2021

Cortex M3/4 parts also often provide a Sleep cycles in the DWT. L0 does not provide.

Isaac Fróes
Associate II
July 26, 2021

I solved it a while ago using the RTC time stamp. I saved one before going to sleep and compare it with another wen the board wakes.

Thanks for all the help you guys provided.