Suspend: RTC wakeup, sleep

Hal Murray hmurray at megapathdsl.net
Wed Jul 28 05:34:10 EDT 2010


Can somebody give me a pointer to some sample code that will wake up a 
suspended system in 5 minutes?  I'm assuming there is some way to do this 
using the alarm interrupt from the RTC.

What should I have searched for?  I poked around a bit, but didn't find much. 
 (One wiki page from a few years ago was mostly crossed out and said it was 
way out of date.)

Shell preferred, but I can use python or c.



Can somebody confirm that sleep does what I expect on suspended systems?

My expectation is that the sleep timer logically ticks when suspended, but 
that the system won't get woken up when the sleep timer expires.

For example, suppose my program does a sleep(100), and shortly after that the 
system suspends.

If the next wakeup is 200 seconds after the start of the sleep, my program 
should run then (along with whatever caused the wakeup).

Or if the system wakes up after 50 seconds and doesn't suspend again, my 
program should run 100 seconds after it started to sleep.

If not, how does it work?



-- 
These are my opinions, not necessarily my employer's.  I hate spam.






More information about the Devel mailing list