CHAPTER 5 CLOCK GENERATOR
Preliminary User’s Manual U16846EJ1V0UD
100
5.6 Time Required to Switch Between Ring-OSC Clock and High-Speed System Clock
Bit 0 (MCM0) of the main clock mode register (MCM) is used to switch between the Ring-OSC clock and high-
speed system clock.
In the actual switching operation, switching does not occur immediately after MCM0 rewrite; several instructions
are executed using the pre-switch over clock after switching MCM0 (see Table 5-5).
Bit 1 (MCS) of MCM is used to judge that operation is performed using either the Ring-OSC clock or high-speed
system clock.
To stop the original clock after changing the clock, wait for the number of clocks shown in Table 5-5.
Table 5-5. Time Required to Switch Between Ring-OSC Clock and High-Speed System Clock
PCC
Time Required for Switching
PCC2
PCC1
PCC0
High-Speed System Clock
→
Ring-OSC Ring-OSC
→
High-Speed System Clock
0 0 0
f
XP
/f
R
+ 1 clock
0 0 1
f
XP
/2f
R
+ 1 clock
2 clocks
Caution To calculate the maximum time, set f
R
= 120 kHz.
Remarks 1. PCC: Processor clock control register
2. f
XP
: High-speed system clock oscillation frequency
3. f
R
: Ring-OSC clock oscillation frequency
4. The maximum time is the number of clocks of the CPU clock before switching.
5.7 Time Required for CPU Clock Switchover
The CPU clock can be switched using bits 0 to 2 (PCC0 to PCC2) of the processor clock control register (PCC).
The actual switchover operation is not performed immediately after rewriting to the PCC; operation continues on
the pre-switchover clock for several instructions (see Table 5-6).
Table 5-6. Maximum Time Required for CPU Clock Switchover
Set Value Before
Switchover
Set Value After Switchover
PCC2 PCC1 PCC0 PCC2 PCC1 PCC0 PCC2 PCC1 PCC0 PCC2 PCC1 PCC0 PCC2 PCC1 PCC0
PCC2 PCC1 PCC0
0 0 0 0 0 1 0 1 0 0 1 1 1 0 0
0
0
0
16 clocks
16 clocks
16 clocks
16 clocks
0
0
1
8 clocks
8 clocks
8 clocks
8 clocks
0
1
0
4 clocks
4 clocks
4 clocks
4 clocks
0
1
1
2 clocks
2 clocks
2 clocks
2 clocks
1 0 0
1
clock
1
clock
1 clock
1 clock
Caution Setting the following values is prohibited when the CPU operates on the Ring-OSC clock.
•
PCC2, PCC1, PCC0 = 0, 1, 0
•
PCC2, PCC1, PCC0 = 0, 1, 1
•
PCC2, PCC1, PCC0 = 1, 0, 0
Remark The maximum time is the number of clocks of the CPU clock before switching.