Real-time clock (RTC)
RM0365
739/1080
DocID025202 Rev 7
To enable the RTC Tamper interrupt, the following sequence is required:
1.
Configure and enable the NVIC 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 NVIC 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 NVIC 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.
27.6 RTC
registers
of the reference manual for a list of abbreviations used in
register descriptions.
The peripheral registers can be accessed by words (32-bit).
27.6.1
RTC time register (RTC_TR)
The RTC_TR is the calendar time shadow register. This register must be written in
initialization mode only. Refer to
Calendar initialization and configuration on page 729
and
Reading the calendar on page 730
This register is write protected. The write access procedure is described in
Address offset: 0x00
Table 134. 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