188.8.131.52.2 TC Registers Write Access
TC registers write accesses can be done in two ways:
- Direct write into the TC registers. In this case, because the RTC keeps running, there can be a discrepancy between the final time written and the target time to be written because some of the registers can toggle in between register accesses. Software must manage the register change during the writing.
- Write access while RTC is stopped. Software can stop the RTC by the clearing STOP_RTC bit of the control register and checking the RUN bit of the status to be sure that RTC is frozen. It then updates the TC values and restarts the RTC by setting the STOP_RTC bit, which ensures that the final written values are aligned with the targeted values.