Renesas rl78 User Manual

Page of 1004
 
RL78/G1A 
 
CHAPTER  8   INTERVAL  TIMER 
8.4.2  Starting counter operation after returning from HALT or STOP mode and then shifting to HALT or STOP 
mode again 
When setting the RINTE bit to 1 to start operation of the counter after returning from the HALT or STOP mode and then 
shifting to the HALT or STOP mode again, either confirm that the value written to the RINTE bit (1) has been applied, or 
make sure that at least one count clock cycle elapses between returning from HALT or STOP mode and shifting to HALT 
or STOP mode again. 
 
•  After setting RINTE to 1, confirm that the RINTE bit value is actually 1 by polling the bit, and then shift to the HALT or 
STOP mode (see Example 1 in Figure 8-6). 
•  After setting RINTE to 1, wait for at least one cycle of the count clock to elapse before shifting to the HALT or STOP 
mode (see Example 2 in Figure 8-6). 
 
Figure 8-6.  Shifting to HALT or STOP Mode after Setting RINTE to 1 
 
RINTE = 1 
HALT instruction execution 
STOP instruction execution 
Waiting at least for one 
count clock 
Restoring from HALT mode 
Restoring from STOP mode 
Shifts to HALT mode 
or STOP mode 
At least for one count 
clock from restore 
Yes
RINTE = 1 
No 
RINTE = 1?
Sets to counter operation 
start 
Checks the counter 
operation start
HALT instruction execution 
STOP instruction execution 
Shifts to HALT mode or 
STOP mode 
Restoring from HALT mode 
Restoring from STOP mode 
Example 1 
Example 2 
 
R01UH0305EJ0200  Rev.2.00 
 
 
326  
Jul 04, 2013