ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ltib] date and rtc


From: aydemir kala
Subject: [Ltib] date and rtc
Date: Wed, 16 Feb 2011 15:45:27 +0200

Hello,
 
I am using fdi3250 board with kernel 2.6.34. My problem is when i read pcf8563 rtc chip by i2cget command it gives different time, when i use date command it gives different time when i do more /proc/dev/rtc it gives different time. When i set the date by date -s "16 Feb 2011 15:29:00"  then the date is working but when i reset the board it gives
address@hidden /root]# date
Thu Jan  1 01:52:40 UTC 1970
address@hidden /]# more /proc/driver/rtc
rtc_time        : 01:47:22
rtc_date        : 1970-01-01
alrm_time        : 06:28:15
alrm_date        : ****-02-07
alarm_IRQ        : no
alrm_pending        : no
24hr                : yes
address@hidden /]# i2cget 0x0 0x51 0x3
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will read from device file /dev/i2c-0, chip address 0x51, data address
0x03, using read byte data.
Continue? [Y/n] y
0x58
 
for example i set the year 2011 by using i2cset command. When i read date from pcf8563 it gives 2011 but when i read date by using date command it gives 1970.
 
address@hidden /root]# i2cget 0x0 0x51 0x8
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will read from device file /dev/i2c-0, chip address 0x51, data address
0x08, using read byte data.
Continue? [Y/n] y
0x11
address@hidden /root]# date
Thu Jan  1 02:01:30 UTC 1970 
 
I think linux softtimer, date command of linux can not get the date from pcf8563 rtc timer and can not start counting true time.
 
do you have any suggestions?
 
Thanks alot
 
Best Regards
 
Aydemir
 
 
 
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]