AT13382

RTC

In SAM L21B there is an added configuration bit in the RTC, CTRLA.COUNTSYNC.

COUNTSYNC is used to enable read synchronization of the COUNT/CLOCK register. If this bit is not set the returned value when reading the COUNT/CLOCK register will always return 0. Setting the bit will enable read synchronization, and the current count value will be returned when reading the COUNT/CLOCK register.

This bit was not visible and enabled by default in SAM L21 revision A. In SAM L21 revision B it has a reset value of zero, and thus needs to be written to 1 to get the same behavior as in SAM L21 revision A.