Real-Time Clock (RTC) UM0306
130/519
8.4.5 RTC counter register (RTC_CNTH / RTC_CNTL)
The RTC core has one 32-bit programmable counter, accessed through two 16-bit registers;
the count rate is based on the TR_CLK time reference, generated by the prescaler.
RTC_CNT registers keep the counting value of this counter. They are write-protected by bit
RTOFF in the RTC_CR register, and a write operation is allowed if the RTOFF value is ‘1’. A
write operation on the upper (RTC_CNTH) or lower (RTC_CNTL) registers directly loads the
corresponding programmable counter and reloads the RTC Prescaler. When reading, the
current value in the counter (system date) is returned.
RTC counter register high (RTC_CNTH)
Address Offset: 18h
Reset value: 0000h
RTC counter register low (RTC_CNTL)
Address Offset: 1Ch
Reset value: 0000h
1514131211109876 5 43210
RTC_CNT[31:16]
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
Bits 15:0
RTC_CNT[31:16]: RTC Counter High
Reading the RTC_CNTH register, the current value of the high part of the RTC
Counter register is returned. To write to this register it is necessary to enter
configuration mode using the RTOFF bit in the RTC_CR register.
1514131211109876 5 43210
RTC_CNT[15:0]
rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
Bits 15:0
RTC_CNT[15:0]: RTC Counter Low
Reading the RTC_CNTL register, the current value of the lower part of the RTC
Counter register is returned. To write to this register it is necessary to enter
configuration mode using the RTOFF bit in the RTC_CR register.