Project

General

Profile

RTC Not Keeping Time Between Power Cycles

Added by Brian Compter almost 11 years ago

We are using a 3359 development board and have found that the RTC is not keeping time between power cycles. Each time power is cycled, the clock changes to December 23 2011 11:41 AM.

I've compiled the very latest kernel kernel (2013-02-08 snapshot) and still observe the issue.

Some information that may help:

SOM Module
3359-GX-226-RL
80-000509RL-1A

Output of cat /proc/driver/rtc

root@am335x-evm:/dev# cat /proc/driver/rtc
rtc_time        : 11:42:51
rtc_date        : 2011-12-23
alrm_time       : 00:00:00
alrm_date       : 2000-01-01
alarm_IRQ       : no
alrm_pending    : no
update IRQ enabled      : no
periodic IRQ enabled    : no
periodic IRQ frequency  : 1
max user IRQ frequency  : 64
24hr            : yes

Some applicable lines from our config:

CONFIG_GPIO_TPS65910=y
CONFIG_MFD_TPS65910=y
CONFIG_REGULATOR_TPS65910=y
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0" 
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
CONFIG_RTC_DRV_OMAP=y

Some interesting lines we see when booting:

[    0.120194] tps65910 3-002d: JTAGREVNUM 0x1
[    0.132377] tps65910 3-002d: No interrupt support, no core IRQ
[    1.375805] omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
[    1.727676] omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)

I've measured the voltage across the battery and it is 2.9V.

Any ideas on what is going on?


Replies (4)

RE: RTC Not Keeping Time Between Power Cycles - Added by Michael Williamson almost 11 years ago

Hi Brian,

Can you let me know which revision of AM3359 module you have? The RTC power design was updated in Rev C.

I think you either have the wrong RTC module (the AM3359 on-board RTC, which does not get power from the battery due to excessive current draw) or 2 RTC modules configured: The AM3359 on chip RTC and the TPS65910 RTC module. I think you are looking at the AM3359 one in your output.

You should have CONFIG_RTC_DRV_TPS65910=y in your config file to enable the TPS65910 RTC module.

When we tested, I actually left them both on, and the TPS65910 showed up as rtc1 and the AM3359 showed up as rtc0. The init scripts in the filesystem are working with rtc0, so you will either need to disable the AM3359 RTC (disable CONFIG_RTC_DRV_OMAP) or modify your scripts to work with rtc1.

-Mike

RE: RTC Not Keeping Time Between Power Cycles - Added by Brian Compter almost 11 years ago

Thanks for the quick reply Mike.

I modified my kernel config to enable the TPS65910.
CONFIG_RTC_DRV_TPS65910=y
#CONFIG_RTC_DRV_OMAP=y

Recompiled and tested and indeed it shows up when booting:

[    1.390833] tps65910-rtc tps65910-rtc: rtc core: registered tps65910-rtc as rtc0

I think we have a Rev A board. On the underside of the board in solder mask is the following:

90-000166R-3_RevA

I put a scope on the battery voltage and observed the battery voltage dropping precipitously when external power failed. After a few seconds there is an inflection point and the voltage begins coming back up. If I reapply external power before this inflection point the date is saved correctly. After this point the date is lost and default to 11:41 on Dec 23 2011.

Is this a problem with the RevA baords that was fixed in RevC with the power design?

Thanks,
Brian

RE: RTC Not Keeping Time Between Power Cycles - Added by Michael Williamson almost 11 years ago

Check the Module Product Change Notifications section for details. You should "watch" this page, any published changes or defects will be posted here.

-Mike

RE: RTC Not Keeping Time Between Power Cycles - Added by Michael Williamson almost 11 years ago

BTW: If you have a smart-phone, you should be able to download a free data-matrix code reader.

-Mike

    (1-4/4)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)