
RL78/G13
Clock Generator (Clock Switching) CC-RL
R01AN2831EJ0100 Rev. 1.00
Page 37 of 51
May 28, 2015
5.8.13
Switching from X1 Oscillation Clock to XT1 Oscillation Clock
Figure 5.14 shows the flowchart for switching from X1 oscillation clock to XT1 oscillation clock.
Figure 5.14 Switching from X1 Oscillation Clock to XT1 Oscillation Clock
return
R_CGC_X1ToXT1
Set up HOCO
Select HOCO as main system clock
(f
MAIN
)
Stop X1 oscillator
Select subsystem clock (f
SUB
) as
CPU/peripheral hardware clock (f
CLK
)
CKC register
MCM0
0
MSTOP
1
CKC register
CSS
1