Chapter 12
Real Time Clock (RTC)
XII - 16 RTC Operation
12.3.1 Clock Data Reading Procedure
After RTC is activated, the calendar information can be obtained by reading CALENDAR registers described in
Chapter 12.2.5. To avoid misreading the calendar information because of the occurrence of the calendar update
while reading it, the following procedure (1) or (2) must be performed.
(1) Using 1 second periodic interrupt
In the interrupt handler of 1 second periodic interrupt, read the calendar information.
Figure:12.3.1 Clock Data Reading Procedure (1)
(2) Reading the calendar information several times
Reading the calendar information several times until confirming the calendar information is stable.
Figure:12.3.2 Clock Data Reading Procedure (2)
Start.
A periodic interrupt
with a cycle of a second
is generated.
Read clock data.
Complete reading clock data.
Yes
No
Start
Read clock data: 1st time
Read clock data: 2nd time
Read clock data: N time
1 st data=2nd data=N time data
Complete reading clock data.
Yes
No