background image

Last update:
2020/04/08 18:38

odroid-c4:application_note:rtc_wakeup https://wiki.odroid.com/odroid-c4/application_note/rtc_wakeup?rev=1586338738

https://wiki.odroid.com/

Printed on 2023/06/21 15:35

Universal Time is now:  Wed Apr  

8

 03:07:

55

 UTC 

2020

.

Or you can use the local NTP server that gathers the accurate DateTime by using
GPS. Please refer to the below guide.

https://wiki.odroid.com/internal/odroid-c4/application_note/gpspps_ntp_serve
r

If you have another one, you can use that server to set your system time up.
Please take care of your firewall to not to be blocking the NTP server
working.

Write the current system time to your RTC shield.

target

sudo hwclock 

-w

 

-f

 

/

dev

/

rtc1

In Odroid-C4, the RTC shield will appear as /dev/rtc1 on your system. So you
should add -f option to choose a specify device file when you are using hwclock
command.
We assume that the RTC shield is /dev/rtc1 on the system.

Save the time when the board wakes-up

Then put the DateTime that the time you willing to wake-up your Odroid to
/sys/class/rtc/rtc1/wakealarm file.

Here's an example to enable the wakealarm feature and let the Odroid up in 4 minutes.

target

echo

 

0

 

|

 sudo tee 

/

sys

/

class

/

rtc

/

rtc1

/

wakealarm

echo

 $

(

date 

'+%s'

 

-d

 

'+ 4 minutes'

)

 

|

 sudo tee

/

sys

/

class

/

rtc

/

rtc1

/

wakealarm

Read the RTC status.

target

cat 

/

proc

/

driver

/

rtc

To check if the wakealarm feature enabled or not, see the alarm_IRQ property. It should be yes.

Отзывы: