RL78/G13
Clock Generator (Clock Switching) CC-RL
R01AN2831EJ0100 Rev. 1.00
Page 49 of 51
May 28, 2015
5.8.25
Processing of INTP0 External Interrupt
Figure 5.26 shows the flowchart for processing INTP0 external interrupt.
Figure 5.26 Processing of INTP0 External Interrupt
r_intc0_interrupt
R_IT_Wait_ms()
YES
NO
YES
NO
++g_ClockStatus
g_ClockStatus = 1
return
Read switch input port
Wait for 10 ms
Wait to deal with chattering
Read switch input port
Detect two consecutive switch
presses?
Update clock status
Clock status value within
valid range?
Set clock status to HOCO
Switch status
Not pressed
Branch condition: g_ClockStatus > 3
Switch status
Pressed