Real-time clock (RTC)
To enable the RTC Tamper interrupt, the following sequence is required:
1.
Configure and enable the EXTI Line 21 in interrupt mode and select the rising edge
sensitivity.
2.
Configure and Enable the 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 21 in interrupt mode and select the rising edge
sensitivity.
2.
Configure and Enable the TAMP_STAMP IRQ channel in the NVIC.
3.
Configure the RTC to detect the RTC timestamp event.
Table 98.
Alarm A
Alarm B
Wakeup
TimeStamp
Tamper1 detection
Tamper2 detection
1. Wakeup from STOP and Standby modes is possible only when the RTC clock source is LSE or LSI.
2. If RTC_TAMPER2 pin is present. Refer to device datasheet pinout.
641/1422
Interrupt control bits
Interrupt event
(2)
Doc ID 018909 Rev 4
Enable
Event flag
control
bit
ALRAF
ALRAIE
ALRBF
ALRBIE
WUTF
WUTIE
TSF
TSIE
TAMP1F
TAMPIE
TAMP2F
TAMPIE
Exit the
Exit the
Sleep
Stop
mode
mode
(1)
yes
yes
(1)
yes
yes
(1)
yes
yes
(1)
yes
yes
(1)
yes
yes
(1)
yes
yes
RM0090
Exit the
Standby
mode
(1)
yes
(1)
yes
(1)
yes
(1)
yes
(1)
yes
(1)
yes
Need help?
Do you have a question about the STM32F40 Series and is the answer not in the manual?
Questions and answers