
DocID13284 Rev 2
469/564
UM0404
Real time clock
Figure 191. Divider counters
Bit 15 to bit 4 of RTCPH and RTCDH are not used. When reading, the return value of those
bit will be zeros.
22.1.4
RTCH & RTCL: RTC programmable counter registers
The RTC has 2 x 16-bit programmable counters which count rate is based on the basic time
reference (for example 1 second). As the clock oscillator may be kept working, even in
Power Down mode, the RTC counters may be used as a clock for real time system date
(either the main or the 32 kHz oscillator). In addition RTC counters and registers are not
modified at any system reset. The only way to force their value is to write them via the
XBUS.
These counters are write protected as well. The bit RTOFF of the RTCCON register must be
set (RTC dividers and counters are stopped) to enable a write operation on RTCH or RTCL.
A write operation on RTCH or RTCL register loads directly the corresponding counter. When
reading, the current value in the counter (system date) is returned.
The counters keeps on running while the clock oscillator is working.
RTCL (ED0Eh)
XBUS
Reset Value: xxxxh
RTCH (ED10h)
XBUS
Reset Value: xxxxh
Note:
These registers are not reset.
22.1.5
RTCAH & RTCAL: RTC alarm registers
When the programmable counters reach the 32-bit value stored into RTCAH & RTCAL
registers, an alarm is triggered and the interrupt request RTAIR is generated. These
registers are not protected.
3
2
1
0
7
6
5
4
11 10 9
8
15 14 13 12
3
2
1
0
RTCDH
RTCDL
3
2
1
0
7
6
5
4
11 10 9
8
15 14 13 12
19 18 17 16
20 bit word internal value of the Prescaler divider
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
RTCL
RW
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
RTCH
RW