How the set RTC as wake up source and set a specific time on all the days using sys file system

2.1k views Asked by At

I am using a imx6 SabreSD. I need to set the RTC as the wake up source, and I need to set a specific time on all the day,say 12 midnight(may not be in power down mode at that time) I have a sample echo +x > /sys/class/rtc/rtc0/wakealarm; RTC will wake up system after x seconds

using this i can wake up system after x seconds. But i need this as 00:00:01 as time

I go to suspend state by echo standby > /sys/power/state

Is there any way. Please help Thanks in advance

1

There are 1 answers

0
Armali On

Wake up at midnight:

date +%s -d'day 0' >/sys/class/rtc/rtc0/wakealarm

Wake up at 00:00:01:

date +%s -d'day 00:00:01' >/sys/class/rtc/rtc0/wakealarm