Real-time clock (RTC) applied to STM32L4P5xx and STM32L4Q5xx only
47.3.6
Calendar ultra-low power mode
It is possible to reduce drastically the RTC power consumption by setting the LPCAL bit in
the RTC_CALR register. In this configuration, the whole RTC is clocked by ck_apre instead
of RTCCLK or ck_apre. Consequently, some flags delays are longer, and the calibration
window is longer (refer to
The LPCAL bit is ignored (assumed to be 0) when asynchronous prescaler division factor
(PREDIV_A+1) is not a power of 2.
Switching from LPCAL=0 to LPCAL=1 or from LPCAL=1 to LPCAL=0 is not immediate and
requires a few ck_apre periods to complete.
47.3.7
Programmable alarms
The RTC unit provides programmable alarm: alarm A and alarm B. The description below is
given for alarm A, but can be translated in the same way for alarm B.
The programmable alarm function is enabled through the ALRAE bit in the RTC_CR
register.
The ALRAF is set to 1 if the calendar subseconds, seconds, minutes, hours, date or day
match the values programmed in the alarm registers RTC_ALRMASSR and
RTC_ALRMAR. Each calendar field can be independently selected through the MSKx bits
of the RTC_ALRMAR register, and through the MASKSSx bits of the RTC_ALRMASSR
register.
When the binary mode is used, the subsecond field can be programmed in the alarm binary
register RTC_ALRMABINR.
The alarm interrupt is enabled through the ALRAIE bit in the RTC_CR register.
Caution:
If the seconds field is selected (MSK1 bit reset in RTC_ALRMAR), the synchronous
prescaler division factor set in the RTC_PRER register must be at least 3 to ensure correct
behavior.
Alarm A and alarm B (if enabled by bits OSEL[1:0] in RTC_CR register) can be routed to the
TAMPALRM output. TAMPALRM output polarity can be configured through bit POL the
RTC_CR register.
47.3.8
Periodic auto-wakeup
The periodic wakeup flag is generated by a 16-bit programmable auto-reload down-counter.
The wakeup timer range can be extended to 17 bits.
The wakeup function is enabled through the WUTE bit in the RTC_CR register.
1598/2301
Section : Calibration ultra-low-power
RM0432 Rev 6
RM0432
mode).
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?