cancel
Showing results for 
Search instead for 
Did you mean: 

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

Isaac Fróes
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

6 REPLIES 6
TDK
Guru

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

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
Principal III

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

Uwe Bonnes
Principal III

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

Isaac Fróes
Associate II

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.

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