Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

How to adjust Hardware RTC clock

285 bytes removed, 13:49, 13 November 2013
m
Calculate COM_REG value
If RTC_CTRL_REG
PMIC RTC peripheral compensates each every hour and 1 second the clock drift using the COMP_REG value. Use the next formula to calculate it:
A compensation mechanism accounts for inaccuracy in the 32-kHz oscillator[[File:Rtc formula. In the compensation procedure, the external processor calculates the drift of the 32-kHz oscillator and then loads the compensation registers (RTC_COMP_LSB_REG and RTC_COMP_MSB_REG) with the drift compensation gif]] Now pass your COMP_REG decimal value calculated during the measurement. If the RTC_CTRL_REG[2] AUTO_COMP to 16 bit is enabledhexadecimal, the COMP_REG value (in twos complement) is added to the RTC 32-kHz counter each hour and 1 secondmy case was 0X1333. When COMP_REG is will be added to the RTC 32-kHz counter, the duration of the current second becomes [(32,768 – COMP_REG)/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