RTC counters behavior (seconds and prescaler registers)

Discussion created by ronkim Employee on Nov 14, 2013

This post is to clarify the behavior of the RTC counters. The RTC is a ripple counter, and if you read the counters while they are updating, it can read a value lower than what is expected.  For example, the seconds register while incrementing from 0x3B77 to 0x3B78 if read twice could read 3B77 -> 3B74 -> 3B78. The following excerpt is from an updated RM and will be propagated to other RMs as they are updated.


Reading the time counter (either seconds or prescaler) while it is incrementing may return invalid data due to synchronization of the read data bus. If it is necessary for software to read the prescaler or seconds counter when they could be incrementing, it is recommended that two read accesses are performed and that software verifies that the same data was returned for both reads.