SWCU185G January 2018 – June 2024 CC1312PSIP , CC1312R , CC1352P , CC1352R , CC2642R , CC2642R-Q1 , CC2652P , CC2652PSIP , CC2652R , CC2652RB , CC2652RSIP , CC2662R-Q1
The AON_RTC implements a 70-bit, free-running counter incremented by a programmable value for each 32 kHz clock. The programmable value allows compensation of ppm-offsets in the 32 kHz clock, making it possible for the counter to operate with a very high precision.
The counter starts from 0 when enabled following power up of the AON_RTC, but can also be reset to 0 or any other new value by the software. The counter measures seconds (32 bit) and subseconds (32 bit).
By default, the AON_RTC increments its counter with 1/32768 seconds each 32 kHz clock tick. A subsecond increment value of 0x20 000 corresponds to 1/32768 seconds. Increasing or decreasing the subsecond increments value increases or decreases the speed of the AON_RTC by the same amount.
Change the increment by updating the AUX_SYSIF:RTCSUBSECINC0 and the AUX_SYSIF:RTCSUBSECINC1 registers, and then load the new setting to the AON_RTC by a write to the AUX_SYSIF:RTCSUBSECINCCTL.UPD_REQ register. The new subsecond increment value must not be changed by AUX until it has received an acknowledgment from the AON_RTC. The acknowledgment can be read from the AUX_SYSIF:RTCSUBSECINCCTL.UPD_ACK register. After the acknowledgment has been received, the AUX_SYSIF:RTCSUBSECINCCTL.UPD_REQ register can be written back to 0 and a new subsecond increment can be uploaded, if needed.
To perform an atomic read of the free-running counter, a read must first be done of the seconds part AON_RTC:SEC. This will latch the subseconds part AON_RTC:SUBSEC until read. In addition AON_RTC:TIME register returns the lower halfword of the AON_RTC:SEC register and the upper halfword of the AON_RTC:SUBSEC register. This is the same format as the match and capture registers.