Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to adjust Hardware RTC clock

188 bytes removed, 11:00, 14 November 2013
m
Calculate COM_REG value
==== Calculate COM_REG value ====
If RTC_CTRL_REG autocompensation is enabled PMIC RTC peripheral compensates will compensate every hour and 1 second the clock drift using the COMP_REG value, It adds or substract a second. Use the The next formula to calculate calculates it:
[[File:Rtc formula.gif]]
Now pass your COMP_REG decimal value to 16 bit hexadecimal, in my case was 0X1333. COMP_REG will be added to the RTC 32-kHz counter, the duration of the current second becomes [(32,768 – COMP_REG4915)/32,768] seconds; therefore, it is possible to compensate the RTC with 1/32,768-second time unit accuracy each hour.
==== Edit registers ====
4,199
edits