Real-time clock (RTC) RM0351
1080/1693 DocID024597 Rev 3
34.5 RTC interrupts
All RTC interrupts are connected to the EXTI controller. Refer to Section 12: Extended
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.
Low-power sleep No effect. RTC interrupts cause the device to exit the Low-power sleep mode.
Stop 0
Peripheral registers content is kept.Stop 1
Stop 2
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.
Shutdown
The RTC remains active when the RTC clock source is LSE. RTC alarm, RTC
tamper event, RTC timestamp event, and RTC Wakeup cause the device to exit
the Shutdown mode.
Table 172. Effect of low-power modes on RTC
Mode Description