pcf85263A fails to upgrade time

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

pcf85263A fails to upgrade time

1,041 Views
kumarnarendrasi
Contributor II

Hi,

We have developed timer based lubrication system for which we have used PCF85263A RTC chipset.  I am facing one issue that RTC timer normally updates correctly but when time reaches 19:59:00(24hour mode), the next minute, time resets to 00:00:00 instead of 20:00.

if i set time 00:00:00 to 19:59:00, it sets time correctly and RTC updates time correctly up to 19:59:59 but next second, it resets to 00:00:00.

If i set time as 21:00:00, it sets time as 1:00:00, when i set time as 22:00:00, it sets time as 02:00:00, when i set time as 23:00:00 then it sets time as 03:00:00. So my RTC time is not updating more than 20hours.

Can anyone please help me what might be problem? what are registers to be set etc. I need to set 24hour format

0 Kudos
3 Replies

917 Views
guoweisun
NXP TechSupport
NXP TechSupport

Hi

I can see your wrote that --The problem got solved. I had done mistake in reading RTC time. basically 5bits are assigned for hour but i was doing logical AND operation with 0x1F to the read RTC hour value instead of 0x3F and hence the hour value 20-23hrs was reading as 0-3hrs.

0 Kudos

917 Views
kumarnarendrasi
Contributor II

Hi,

Yes the problem got resolved. I had just corrected my old reply. its 6bits not 5bits.I had mentioned wrongly as 5bits which i edited and corrected.

0 Kudos

917 Views
kumarnarendrasi
Contributor II

Hi,

The problem got solved. I had done mistake in reading RTC time. basically 6bits are assigned for hour(24hour format) but i was doing logical AND operation with 0x1F to the read RTC hour value instead of 0x3F and hence the hour value 20-23hrs was reading as 0-3hrs.

0 Kudos