Real-time clock (RTC)
RM0090
808/1731
DocID018909 Rev 11
26.6.3 RTC
control
register (RTC_CR)
Address offset: 0x08
Backup domain reset value: 0x0000 0000
System reset: not affected
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
Reserved
COE
OSEL[1:0]
POL
COSEL
BKP
SUB1H ADD1H
rw
rw
rw
rw
rw
rw
w
w
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
TSIE
WUTIE ALRBIE ALRAIE
TSE
WUTE ALRBE ALRAE
DCE
FMT
BYPS
HAD
REFCKON TSEDGE
WUCKSEL[2:0]
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
rw
Bits 31:24 Reserved, must be kept at reset value.
Bit 23
COE
: Calibration output enable
This bit enables the RTC_CALIB output
0: Calibration output disabled
1: Calibration output enabled
Bits 22:21
OSEL[1:0]
: Output selection
These bits are used to select the flag to be routed to RTC_ALARM output
00: Output disabled
01: Alarm A output enabled
10:Alarm B output enabled
11: Wakeup output enabled
Bit 20
POL
: Output polarity
This bit is used to configure the polarity of RTC_ALARM output
0: The pin is high when ALRAF/ALRBF/WUTF is asserted (depending on OSEL[1:0])
1: The pin is low when ALRAF/ALRBF/WUTF is asserted (depending on OSEL[1:0]).
Bit 19
COSEL
: Calibration output selection
When COE=1, this bit selects which signal is output on RTC_CALIB.
0: Calibration output is 512 Hz
1: Calibration output is 1 Hz
These frequencies are valid for RTCCLK at 32.768 kHz and prescalers at their default
values (PREDIV_A=127 and PREDIV_S=255). Refer to
Section 26.3.14: Calibration clock
Bit 18
BKP
: Backup
This bit can be written by the user to memorize whether the daylight saving time change has
been performed or not.
Bit 17
SUB1H
:
S
ubtract 1 hour (winter time change)
When this bit is set outside initialization mode, 1 hour is subtracted to the calendar time if the
current hour is not 0. This bit is always read as 0.
Setting this bit has no effect when current hour is 0.
0: No effect
1: Subtracts 1 hour to the current time. This can be used for winter time change.