DocID025202 Rev 7
738/1080
RM0365
Real-time clock (RTC)
764
Note:
When the RTC_CALIB or RTC_ALARM output is selected, the RTC_OUT pin is
automatically configured in output alternate function.
When COSEL bit is cleared, the RTC_CALIB output is the output of the 6th stage of the
asynchronous prescaler.
When COSEL bit is set, the RTC_CALIB output is the output of the 8th stage of the
synchronous prescaler.
27.3.16 Alarm
output
The OSEL[1:0] control bits in the RTC_CR register are used to activate the alarm alternate
function output RTC_ALARM, and to select the function which is output. These functions
reflect the contents of the corresponding flags in the RTC_ISR register.
The polarity of the output is determined by the POL control bit in RTC_CR so that the
opposite of the selected flag bit is output when POL is set to 1.
Alarm alternate function output
The RTC_ALARM pin can be configured in output open drain or output push-pull using the
control bit in the register.
Note:
Once the RTC_ALARM output is enabled, it has priority over RTC_CALIB (COE bit is don't
care and must be kept cleared).
When the RTC_CALIB or RTC_ALARM output is selected, the
RTC_OUT
pin is
automatically configured in output alternate function.
27.4
RTC low-power modes
27.5 RTC
interrupts
All RTC interrupts are connected to the NVIC controller. Refer to
interrupts and events controller (EXTI)
To enable the RTC Alarm interrupt, the following sequence is required:
1.
Configure and enable the NVIC line corresponding to the RTC Alarm event in interrupt
mode and select the rising edge sensitivity.
2. Configure and enable the RTC_ALARM IRQ channel in the NVIC.
3. Configure the RTC to generate RTC alarms.
Table 133. Effect of low-power modes on RTC
Mode Description
Sleep
No effect
RTC interrupts cause the device to exit the Sleep mode.
Stop
The RTC remains active when the RTC clock source is LSE or LSI. RTC alarm, RTC
tamper event, RTC timestamp event, and RTC Wakeup cause the device to exit the Stop
mode.
Standby
The RTC remains active when the RTC clock source is LSE or LSI. RTC alarm, RTC
tamper event, RTC timestamp event, and RTC Wakeup cause the device to exit the
Standby mode.