Datasheet
78K0/Kx2-L CHAPTER 5 CLOCK GENERATOR
R01UH0028EJ0400 Rev.4.00 238
Sep 27, 2010
Remark 2. When switching the CPU clock from the main system clock to the subsystem clock, calculate the number
of clocks by rounding up to the next clock and discarding the decimal portion, as shown below.
Example When switching CPU clock from f
XP to fSUB (@ oscillation with fXP = 10 MHz, fSUB =
32.768 kHz)
f
XP/fSUB = 10000/32.768 ≅ 305.1 → 306 clocks
By setting bit 0 (MCM0) of the main clock mode register (MCM), the main system clock can be switched (between the
internal high-speed oscillation clock and the high-speed system clock).
The actual switchover operation is not performed immediately after rewriting to MCM0; operation continues on the pre-
switchover clock for several clocks (refer to Table 5-10).
Whether the CPU is operating on the internal high-speed oscillation clock or the high-speed system clock can be
ascertained using bit 1 (MCS) of MCM.
Table 5-10. Maximum Time Required for Main System Clock Switchover
Set Value Before Switchover Set Value After Switchover
MCM0 MCM0
0 1
0 1 + 2fIH/fXH clock
1 1 + 2fXH/fIH clock
Cautions 1. When switching the internal high-speed oscillation clock to the high-speed system clock, bit 2
(XSEL) of MCM must be set to 1 in advance. The value of XSEL can be changed only once after a
reset release.
2. Do not rewrite MCM0 when the CPU clock operates with the subsystem clock.
Remarks 1. The number of clocks listed in Table 5-10 is the number of main system clocks before switchover.
2. Calculate the number of clocks in Table 5-10 by removing the decimal portion.
Example When switching the main system clock from the internal high-speed oscillation clock to the
high-speed system clock (@ oscillation with f
IH = 8 MHz, fXH = 10 MHz)
1 + 2f
IH/fXH = 1 + 2 × 8/10 = 1 + 2 × 0.8 = 1 + 1.6 = 2.6 → 2 clocks