![ARTERY AT32WB415 Series Reference Manual Download Page 239](http://html1.mh-extra.com/html/artery/at32wb415-series/at32wb415-series_reference-manual_2977599239.webp)
AT32WB415
Series Reference Manual
2022.04.13
Page 239
Ver 2.00
17.3.9 ERTC wakeup
ERTC can be woken up by alarm clocks, periodic auto wakeup, time stamps or tamper events. To
enable an ERTC interrupt, configure as follows:
1.
Configure the EXINT line corresponding to ERTC interrupts as an interrupt mode and enable it,
and select a rising edge
2.
Enable a NVIC channel corresponding to ERTC interrupts
3. Eanble an ERTC interrupt
lists the ERTC clock sources, events and interrupts that are able to wakeup low-power
modes.
Table 17-2 ERTC low-power mode wakeup
Clock sources
Events
Wake up Sleep
Wake
up
Deepsleep
Wakeup Standby
HEXT
Alarm clock A
√
×
×
Alarm clock B
√
×
×
Periodic automatic
wakeup
√
×
×
Time stamp
√
×
×
Tamper event
√
×
×
LICK
Alarm clock A
√
√
√
Alarm clock B
√
√
√
Periodic automatic
wakeup
√
√
√
Time stamp
√
√
√
Tamper event
√
√
√
LEXT
Alarm clock A
√
√
√
Alarm clock B
√
√
√
Periodic automatic
wakeup
√
√
√
Time stamp
√
√
√
Tamper event
√
√
√
Table 17-3 Interrupt control bits
Interrupt events
Event flag
Interrupt enable bit
EXINT line
Alarm clock A
ALAF
ALAIEN
17
Alarm clock B
ALBF
ALBIEN
17
Periodic
automatic
wakeup
WATF
WATIEN
22
Time stamp
TSF
TSIEN
21
Tamper event
TP1F/TP2F
TPIEN
21
17.4 ERTC registers
These peripheral registers must be accessed by words (32 bits).
ERTC registers are 16-bit addressable registers.
Table 17-4 ERTC register map and reset values
Register name
Offset
Reset value
ERTC_TIME
0x00
0x0000 0000
ERTC_DATE
0x04
0x0000 2101
ERTC_CTRL
0x08
0x0000 0000
ERTC_STS
0x0C
0x0000 0007
ERTC_DIV
0x10
0x007F 00FF
ERTC_WAT
0x14
0x0000 FFFF
ERTC_CCAL
0x18
0x0000 0000
ERTC_ALA
0x1C
0x0000 0000