SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
To write correct data from and to the TC and TC alarm registers and read the TC alarm registers, the MPU must first read the BUSY bit of the status register (RTC_STATUS_REG) until BUSY is equal to zero. Once the BUSY flag is zero, there is a 15-µs access period in which the MPU can program the TC and TC alarm registers. Once the 15-µs access period passes, the BUSY flag must again be read from the STATUS register as previously described. If the MPU accesses the TC registers outside of the access period, then the access is not assured.
The MPU can access the RTC_STATUS_REG and the RTC_CTRL_REG registers at any time, with the exception of the RTC_CTRL_REG[5] bit, which can only be changed when the RTC is stopped. The MPU can stop the RTC by clearing the STOP_RTC bit of RTC_CTRL_REG. After clearing this bit, the RUN bit in RTC_STATUS_REG must be checked to verify the RTC has stopped. Once this is confirmed, the TC values can be updated. After the values have been updated, the RTC can be restarted by resetting the STOP_RTC bit.
After writing to a TC register, software must wait four clock cycles before reading the value from the register. If this wait time is not observed and the TC register is accessed, then old data will be read from the register.
To remove any possibility of interrupting the register read process, which introduces a risk of violating the authorized 15-µs access period, TI recommends disabling all incoming interrupts during the register read process.