
Real-time clock (RTC)
RM0351
1204/1830
DocID024597 Rev 5
38.5 RTC
interrupts
All RTC interrupts are connected to the EXTI controller. Refer to
interrupts and events controller (EXTI)
To enable the RTC Alarm interrupt, the following sequence is required:
1.
Configure and enable the EXTI 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.
To enable the RTC Tamper interrupt, the following sequence is required:
1.
Configure and enable the EXTI line corresponding to the RTC Tamper event in interrupt
mode and select the rising edge sensitivity.
2. Configure and Enable the RTC_TAMP_STAMP IRQ channel in the NVIC.
3. Configure the RTC to detect the RTC tamper event.
To enable the RTC TimeStamp interrupt, the following sequence is required:
1.
Configure and enable the EXTI line corresponding to the RTC TimeStamp event in
interrupt mode and select the rising edge sensitivity.
2. Configure and Enable the RTC_TAMP_STAMP IRQ channel in the NVIC.
3. Configure the RTC to detect the RTC time-stamp event.
To enable the Wakeup timer interrupt, the following sequence is required:
1.
Configure and enable the EXTI line corresponding to the Wakeup timer even in
interrupt mode and select the rising edge sensitivity.
2. Configure and Enable the RTC_WKUP IRQ channel in the NVIC.
3. Configure the RTC to detect the RTC Wakeup timer event.
Table 213. Interrupt control bits
Interrupt event
Event flag
Enable
control
bit
Exit from
Sleep
mode
Exit from
Stop
mode
Exit from
Standby
mode
Alarm A
ALRAF
ALRAIE
yes
yes
(1)
1. Wakeup from STOP and Standby modes is possible only when the RTC clock source is LSE or LSI.
yes
Alarm B
ALRBF
ALRBIE
yes
yes
yes
RTC_TS input (timestamp)
TSF
TSIE
yes
yes
yes
RTC_TAMP1 input detection
TAMP1F
TAMPIE
yes
yes
yes
RTC_TAMP2 input detection
TAMP2F
TAMPIE
yes
yes
yes
RTC_TAMP3 input detection
TAMP3F
TAMPIE
yes
yes
yes
Wakeup timer interrupt
WUTF
WUTIE
yes
yes