BAT32G1x9 user manual | Chapter 11 Real-time clock
459 / 1149
Rev.1.02
11.4.4
Alarm settings for the real-time clock
You must first place the WALL position "0" (the alarm does not run invalid) and then set the alarm time.
Figure 11-23 Alarm setting steps
Start
WALE=0
Configure SEC
WALIE=1
Configure ALARMWM
Configure ALARMWH
Configure ALARMWW
WALE=1
WAFG=1?
Yes
No
alarm processing
alarm alignment operation invalid
generate interrupt via alarm
alignment
configure alarm minute register
configure alarm hour register
configure alarm week register
alarm alignment operation valid
INTRTC=1
?
No
Yes
detect alarm
alignment
No
fixed cycle interrupt
processing
Note 1 There is no limit to the order of write operations for alarm minute registers (ALARMWM), alarm hour registers
(ALARMWH), and alarm clock week registers (ALARMWW).
2. Fixed cycle interrupts and alarm clock consistent interrupts use the same interrupt source (INTRTC). In the case
of using both interrupts, in the event of INRTC, it is possible to determine which interrupt occurred by confirming
the fixed-period interrupt status flag (RIFG) and the alarm clock detection status flag (WAFG) when intRTC occurs.