RTC with Battery - Time information lost if board powered off over night

Hi Folks,
I have installed a MS518SE-FL35E battery after removing R65 on the
Beagleboard about 2 months back. Though initially, the RTC worked as
expected, over the last couple of days I have noticed that the RTC
loses all time information if the board is powered off for more than 8
hours or so. If the board is powered off for an hour or two, the RTC
retains the time information correctly.

I have checked the voltage across the battery when the RTC is powered
off, it shows about 2.3V. I have noticed this behavior with 2
different boards.

The only "wrong" action I can think of is that the board is always
powered off by turning off the power supply instead of being properly
shutdown by software. This is a requirement of the application that
it is being used for. Would this incorrect powering off affect the way
the PMIC sets up the RTC in poweroff state?

I use Angstrom from OE as the operating system and am running the
linux-omap-psp-2.6.32 kernel which has the following patch 0035-RTC-
add-support-for-backup-battery-recharge.patch included.

I got the similar RTC issue. Normally, the hardware clock can keep
preset time for some days even if it is
powered off or recycle. But this time I found it is changed when I
reboot C4 BB. the linux kernel boot messages
show

twl_rtc twl_rtc: setting system clock to 2000-01-01 00:46:44 UTC
(946687604)

I looked at rtc driver, it reads time from the hardware. I just wonder
how this time is set from a battery
backed-up hardware clock.

Hi all

Hi Folks,
I have installed a MS518SE-FL35E battery after removing R65 on the
Beagleboard about 2 months back. Though initially, the RTC worked as
expected, over the last couple of days I have noticed that the RTC
loses all time information if the board is powered off for more than 8
hours or so. If the board is powered off for an hour or two, the RTC
retains the time information correctly.

I have checked the voltage across the battery when the RTC is powered
off, it shows about 2.3V. I have noticed this behavior with 2
different boards.

The only "wrong" action I can think of is that the board is always
powered off by turning off the power supply instead of being properly
shutdown by software. This is a requirement of the application that
it is being used for. Would this incorrect powering off affect the way
the PMIC sets up the RTC in poweroff state?

I use Angstrom from OE as the operating system and am running the
linux-omap-psp-2.6.32 kernel which has the following patch 0035-RTC-
add-support-for-backup-battery-recharge.patch included.

I got the similar RTC issue. Normally, the hardware clock can keep
preset time for some days even if it is
powered off or recycle. But this time I found it is changed when I
reboot C4 BB. the linux kernel boot messages
show

twl_rtc twl_rtc: setting system clock to 2000-01-01 00:46:44 UTC
(946687604)

I looked at rtc driver, it reads time from the hardware. I just wonder
how this time is set from a battery
backed-up hardware clock.

Hi Kai

> Hi Folks,
> I have installed a MS518SE-FL35E battery after removing R65 on the
> Beagleboard about 2 months back. Though initially, the RTC worked as
> expected, over the last couple of days I have noticed that the RTC
> loses all time information if the board is powered off for more than 8
> hours or so. If the board is powered off for an hour or two, the RTC
> retains the time information correctly.

> I have checked the voltage across the battery when the RTC is powered
> off, it shows about 2.3V. I have noticed this behavior with 2
> different boards.

> The only "wrong" action I can think of is that the board is always
> powered off by turning off the power supply instead of being properly
> shutdown by software. This is a requirement of the application that
> it is being used for. Would this incorrect powering off affect the way
> the PMIC sets up the RTC in poweroff state?

> I use Angstrom from OE as the operating system and am running the
> linux-omap-psp-2.6.32 kernel which has the following patch 0035-RTC-
> add-support-for-backup-battery-recharge.patch included.

I got the similar RTC issue. Normally, the hardware clock can keep
preset time for some days even if it is
powered off or recycle. But this time I found it is changed when I
reboot C4 BB. the linux kernel boot messages
show

twl_rtc twl_rtc: setting system clock to 2000-01-01 00:46:44 UTC
(946687604)

I looked at rtc driver, it reads time from the hardware. I just wonder
how this time is set from a battery
backed-up hardware clock.

I have the same rtc reseting issue. when i reboot or shutdown the
system. the rtc time and system is ok, but if I reset the CPU (via
reset pin of the cpu over a pmic), the rtc time will lost. when system
boot again, it will show

setting system clock to 2000-01-01 00:46:44 UTC (946687604)...

anyone have any clues?
many thanks

I recently mentioned a problem I had with the default kernel sources and the battery backed up clock.

I recommend running this couple of commands to verify the settings of your battery backed clock:

hwclock --show ; date

If the clock is not set correctly, then it will be obvious from the output of those two lines. You can then try this set of three commands and see if you get a different output.

hwclock --systohc ; hwclock --show ; date

If your hwclock isn’t getting set, you should be able to find information about the kernel patch that enables the protection line in this list somewhere.

Wim

Hi sgeorge,
I know it’s been quite a long time since your post but I am trying to do something similar and wanted to make sure you were able to solve the problem before I decide to go down this path.

Thanks
Ashwin