SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
The TC registers have a read-show register. The reading of the SECONDS register updates all TC registers. For example, the Year is updated only on a reading of the SECONDS register. The TC registers are updated every second as the time changes. During a read of the SECONDS register, the RTC copies the current values of the time/date registers into shadow read registers. This isolation assures that the CPU can capture all the time/date values when the SECONDS read request occurs and is not subject to changing register values from time updates.
If desired, the RTC also provides a one-time-triggered minute-rounding feature to round the MINUTE:SECOND registers to the nearest minute (with zero seconds). This feature is enabled by setting the ROUND_30S bit in the control register (RTC_CTRL_REG). The RTC automatically rounds the time values to the nearest minute the next time the SECONDS register is read.
Software should always read the SECONDS register first. However, software does not have to poll any status bit to determine when to read the TC registers. Table 23-6 defines the TC set that gets shadowed.
Time Unit | Range | Remarks |
---|---|---|
Year | 00 to 99 | |
Month | 01 to 12 | |
Day | 01 to 31 | Months 1, 3, 5, 7, 8, 10, 12 |
01 to 30 | Months 4, 6, 9, 11 | |
01 to 29 | Month 2 (leap year) | |
01 to 28 | Month 2 (common year) | |
Week | 00 to 06 | Day of week |
Hour | 00 to 23 | 24-hour mode |
01 to 12 | AM/PM mode | |
Minute | 00 to 59 | |
Seconds | 00 to 59 |