
DocID13284 Rev 2
467/564
UM0404
Real time clock
Note:
All the bits of RTCCON are active high.
The two RTC Interrupt request lines are internally connected to Port2 input lines in order to
trigger an external interrupt that wakes the chip up if in Power Down mode.
All the RTC registers are not bit addressable.
To clear the RTC Interrupt Request flags (bit 0 and bit 2 of the RTCCON register) it is
necessary to write a ‘1’ to the corresponding bit of the RTCCON register.
22.1.2
RTCPH & RTCPL: RTC prescaler registers
The 20-bit programmable prescaler divider is loaded with two registers.
The 4 most significant bits are stored into RTCPH and the 16 less significant bits are stored
in RTCPL. In order to keep the system clock, those registers are not reset.
They are write protected by bit RTOFF of RTCCON register, write operation is allowed if
RTOFF is set.
RTCPL (ED06h)
XBUS
Reset Value: xxxxh
Bit
Function
RTCSIR
RTC Second Interrupt Request flag
‘0’: the bit was reset less than one basic clock tick ago.
‘1’: the interrupt was triggered.
RTCSEN
RTC Second interrupt Enable
‘0’: RTCSI is disabled.
‘1’: RTCSI is enabled, it is generated every basic clock tick.
RTCAIR
RTC Alarm Interrupt Request flag
(when the alarm is triggered)
‘0’: the bit was reset less than a
n
basic clock tick ago.
‘1’: the interrupt was triggered.
RTCAEN
RTC Alarm Interrupt Enable
‘0’: RTCAI is disabled.
‘1’: RTCAI is enabled, it is generated when the counters reach the alarm value.
RTCOFF
RTC Switch Off bit
‘0’: clock oscillator and RTC are kept on running even if ST10 is in Power Down
mode.
‘1’: clock oscillator is switched off if ST10 enters Power Down mode. Besides,
setting this bit RTC dividers and counters are stopped, and registers can be written.
OSC
Oscillator Selection Flag
‘0’: the clock oscillator used by the RTC is the Main oscillator.
‘1’: the clock oscillator used by the RTC is the low power 32 kHz oscillator.
OFF32
32 kHz Oscillator Switch Off bit
‘0’: The 32 kHz oscillator is enabled.
‘1’: The 32 kHz oscillator is disabled.
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
RTCPL
RW