RL78/G13 CHAPTER 7 REAL-TIME CLOCK
R01UH0146EJ0100 Rev.1.00 449
Sep 22, 2011
Yes
RTCE = 1
RWAIT = 1
No
Yes
RWAIT = 0
No
RWST = 1 ?
RWST = 0 ?
STOP instruction execution
RTCE = 1
STOP instruction execution
Waiting at least for 2
f
RTC clocks
Sets to counter operation
start
Shifts to STOP mode
Sets to counter operation
start
Sets to stop the SEC to YEAR
counters, reads the counter
value, write mode
Checks the counter wait status
Sets the counter operation
Shifts to STOP mode
Example 1 Example 2
7.4.2 Shifting to STOP mode after starting operation
Perform one of the following processing when shifting to STOP mode immediately after setting the RTCE bit to 1.
However, after setting the RTCE bit to 1, this processing is not required when shifting to STOP mode after the INTRTC
interrupt has occurred.
• Shifting to STOP mode when at least two input clocks (f
RTC) have elapsed after setting the RTCE bit to 1 (see Figure
7-18, Example 1).
• Checking by polling the RWST bit to become 1, after setting the RTCE bit to 1 and then setting the RWAIT bit to 1.
Afterward, setting the RWAIT bit to 0 and shifting to STOP mode after checking again by polling that the RWST bit
has become 0 (see Figure 7-18, Example 2).
Figure 7-18. Procedure for Shifting to STOP Mode After Setting RTCE bit to 1