SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
To compensate for any inaccuracy of the 32-kHz oscillator the MPU can perform a calibration of the oscillator frequency, calculate the drift compensation versus a 1-hour period, and load the compensation registers with the drift compensation value. Auto compensation is enabled by the AUTO_COMP bit in the RTC_CTRL_REG register. If the value of the COMP_REG registers (RTC_COMP_LSB_REG and RTC_COMP_MSB_REG) is positive, compensation occurs after the second change event. COMP_REG cycles are removed from the next second. If the COMP_REG value is negative, compensation occurs before the second change event. COMP_REG cycles are added to the current second. This enables compensation with a 1 32-kHz period accuracy each hour. The waveform in Figure 23-7 summarizes positive and negative compensation effect.
Access to the RTC_COMP_MSB_REG and RTC_COMP_LSB_REG registers must respect the available access period. These registers should not be updated during compensation (the first second of each hour), but it is alright to update them during the second preceding a compensation event. For example, the MPU could load the compensation value into these registers after each hour event, during an available access period.