GD32W51x User Manual
417
with non-secure access.
16.3.20.
RTC power saving mode management
Table 16-5. RTC power saving mode management
Mode
Active in Mode
Exit Mode
Sleep
Yes
RTC Interrupts
Deep-
Sleep
Yes: if clock source is LXTAL or
IRC32K
RTC Alarm / Tamper Event / Timestamp Event /
Wake up
Standby
Yes: if clock source is LXTAL or
IRC32K
RTC Alarm / Tamper Event / Timestamp Event /
Wake up
16.3.21.
RTC interrupts
All RTC interrupts are connected to the EXTI controller. When RTC is in secure mode,
configure the RTC_SMI_STAT register to set the interrupt channel, and configure the
RTC_SMI_STAT register when RTC is in non-secure mode.
Below steps should be followed if you want to use the RTC alarm/tamper/timestamp/auto
wakeup interrupt:
1)
Configure and enable the corresponding interrupt line to RTC alarm/tamper/timest
amp/auto wakeup event of EXTI and set the rising edge for triggering
2)
Configure and enable the RTC alarm/tamper/timestamp/auto wakeup interrupt
3)
Configure and enable the RTC alarm/tamper/timestamp/auto wakeup function
Table 16-6. RTC non-secure interrupts control
Interrupt
Event flag
Control bit
Clear interrupt
flag
Exit sleep
Exit deep-
sleep and
standby
Alarm 0
ALRM0F
ALRM0IE
and(ALRM0SECP=1
and
RTCSECP=1)
w rite 1 in
ALRM0FC
Y
Y
(*)
Alarm 1
ALRM1F
ALRM1IE
and(ALRM1SECP=1
and
RTCSECP=1)
w rite 1 in
ALRM1FC
Y
Y
(*)
Wakeup
WTF
WTIE
and(WUTSECP=1 and
RTCSECP=1)
w rite 1 in WTFC
Y
Y
(*)
Timestamp
TSF
TSIE and(TSSECP=1
and
w rite 1 in TSFC
Y
Y
(*)