Real-time clock (RTC) applied to STM32L4P5xx and STM32L4Q5xx only
OSEL[1:0] bits
ALARM
output enable)
00
00
01 or 10 or 11
00
00
01 or 10 or 11
01 or 10 or 11
47.3.4
Clock and prescalers
The RTC clock source (RTCCLK) is selected through the clock controller among the LSE
clock, the LSI oscillator clock, and the HSE clock. For more information on the RTC clock
source configuration, refer to "Reset and clock control (RCC)".
BCD mode (BIN=00)
A programmable prescaler stage generates a 1 Hz clock which is used to update the
calendar. To minimize power consumption, the prescaler is split into 2 programmable
prescalers (see
•
A 7-bit asynchronous prescaler configured through the PREDIV_A bits of the
RTC_PRER register.
•
A 15-bit synchronous prescaler configured through the PREDIV_S bits of the
RTC_PRER register.
Note:
When both prescalers are used, it is recommended to configure the asynchronous prescaler
to a high value to minimize consumption.
The asynchronous prescaler division factor is set to 128, and the synchronous division
factor to 256, to obtain an internal clock frequency of 1 Hz (ck_spre) with an LSE frequency
of 32.768 kHz.
The minimum division factor is 1 and the maximum division factor is 2
This corresponds to a maximum input frequency of around 4 MHz.
f
is given by the following formula:
ck_apre
The ck_apre clock is used to clock the binary RTC_SSR subseconds downcounter. When it
reaches 0, RTC_SSR is reloaded with the content of PREDIV_S.
1596/2301
Table 322. RTC_OUT mapping
COE bit (CALIB
output enable)
0
1
Don't care
0
1
0
1
Figure 457: RTC block
f
CK_APRE
RM0432 Rev 6
OUT2EN
RTC_OUT1 on
bit
0
TAMPALRM
1
TAMPALRM
diagram):
f
RTCCLK
-------------------------------------- -
=
PREDIV_A
+
1
RTC_OUT2 on
PC13
PB2
-
-
CALIB
-
-
-
-
-
CALIB
-
TAMPALRM
CALIB
22
.
RM0432
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?