imx53 - Keep system time after system shutdown

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

imx53 - Keep system time after system shutdown

770 Views
czesławczesławs
Contributor I

Hi all,

I work with imx53 board, MC34708 PMIC and Android 2.3.3. Unfortunatelly I met some problems with sustain system time and date after system shutdown -  after power off it returns to default values ( 1970.01.01 ...).

To be more precise, in the system I can see two rtc's:

  • /sys/class/rtc/rtc0 which comes from imx53, it is connected with system time, because every change of system time changes the value of it.
  • /sys/class/rtc/rtc1 which comes from MC34708 PMIC

After reboot, rtc0 resets (time and date goes to defaults) and rtc1 keeps previous values.

After shutdown but with voltage from wall rtc0 resets and rtc1 keeps previous values.

After shutdown and removing voltage from wall both rtc0 and rtc1 resets.

Of course on board I have coin cell battery which I suppose should keep time and date when device is turn off.

My aim is to have working System time after every reboot and shutdown. I think it can be achieved in two ways - by fixing rtc0 to keep values after power off or by fixing rtc1 to keep values after power and integrate it with System time. Neither of them I know how to do.

As you may noticed from my question, I'm a newbie, so  any advice are welcome.

Thanks in advance,

Czesiek

0 Kudos
1 Reply

442 Views
czesławczesławs
Contributor I

In addition to that question, how to change RTC standing behind the Settings -> Change date and time in user interface?

In default it is rtc0 but I need to use rtc1.

I know how to set System time from rtc1 on boot, but I don't know how to change rtc1 from Android Settings.

Thanks in advance.

0 Kudos