Difference between revisions of "How to adjust Hardware RTC clock"

From IGEP - ISEE Wiki

Jump to: navigation, search
m (Rectify clock drift)
m (Rectify clock drift)
Line 34: Line 34:
 
*Ambient temperature error
 
*Ambient temperature error
 
*Aging error
 
*Aging error
* ...
+
*   ...
  
 
Some software tools can be used to compensate these errors. Once you tested your implementation add some rule to  [http://es.wikipedia.org/wiki/Cron_%28Unix%29 cron deamon] to automatize it.
 
Some software tools can be used to compensate these errors. Once you tested your implementation add some rule to  [http://es.wikipedia.org/wiki/Cron_%28Unix%29 cron deamon] to automatize it.

Revision as of 11:07, 13 November 2013

Igep community logo.png This is a work in progress article. Help other developers like you in the IGEP Community by improving it!

Overview

Real time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time. RTCs are present in almost any electronic device which needs to keep accurate time. More general information here.

In IGEP Boards, MPU and PMIC contains each one a RTC clock:

  • RTC System clock: system clock is controlled by OMAP processors using its internal RTC peripheral. Every bootup, the default firmware copies the hardware clock data from /dev/rtc to system clock data to keeps clock up to date.
  • RTC Hardware clock: hardware clock is controlled by PMIC IC using its internal RTC peripheral. RTC PMIC can afford two behaviours:
    • RTC battery is not used: PMIC RTC peripheral keeps hardware clock alive when OS isn't running and power source is active. If the power source fails, the RTC Hardware clock will lose its clock.
    • RTC battery is used: PMIC RTC peripheral keeps hardware clock alive when OS isn't running and backup battery powers the backup state as far as the input voltage is high enough.

Simplified RTC diagram

Block diagram from IGEP0033

Requirements

This How-to has been tested with an IGEPv2 RC Board (DM3730 and TPS65950), steps used below can be slightly different for other boards:

  • IGEPv2 with its power supply
  • Network cable
  • PC

Rectify clock drift

IGEP Boards use as a source clock a 32.768kHz crystal. This passive component can add clock drifts due:

  • General drift error
  • Ambient temperature error
  • Aging error
  • ...

Some software tools can be used to compensate these errors. Once you tested your implementation add some rule to cron deamon to automatize it.

Set the date and time via NTP

Purge systematic error editing PMIC RTC registers