Hello all,
who can tell a newbee how to set/read the onboard pcf8563?
i get the following massage at boot time but i don't know how to set/read the chip:
2.390000] pcf8563 1-0051: low voltage detected, date/time is not reliable.
[ 2.390000] pcf8563_get_datetime,raw data is st1=08, st2=80, sec=83, min=84, hr=80, mday=80, wday=80, mon=00, year=04
[ 2.400000] pcf8563_get_datetime: tm is secs=3, mins=4, hours=0,mday=0, mon=-1, year=114, wday=0
[ 2.410000] pcf8563 1-0051: retrieved date/time is not valid.
[ 2.420000] pcf8563 1-0051: hctosys: invalid date/time
best regards
Michael
The chip just forgets the date and time when the power is switched off, so it isn't valid when Linux is started again.
You need to set the date and time using Linux command. There is no need to talk to the chip directly. If you have a working network connection, just do:
apt-get install ntpdate
and reboot. Now the time is set correctly at every boot from an internet time server.
Quote from: Bernd on January 20, 2013, 12:37:23 PM
The chip just forgets the date and time when the power is switched off, so it isn't valid when Linux is started again.
You need to set the date and time using Linux command. There is no need to talk to the chip directly. If you have a working network connection, just do:
apt-get install ntpdate
and reboot. Now the time is set correctly at every boot from an internet time server.
hello Bernd
Thank you for the answer.
But how can i set timer and alarm
Michael
Details of what you want to do with those? How often to trigger? How time critical? What precision? etc.
That depends on what you want to do. First your system has to have the correct time and date and the pcf8563 helps Linux to do that.
You can use the cron for starting programs at a given time:
http://en.wikipedia.org/wiki/Cron