Time Required For Switchover Of Cpu Clock And Main System Clock - NEC 78K0 Series User Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0 Series:
Table of Contents

Advertisement

6.6.8 Time required for switchover of CPU clock and main system clock

By setting bits 0 to 2 (PCC0 to PCC2) and bit 4 (CSS) of the processor clock control register (PCC), the CPU clock
can be switched (between the main system clock and the subsystem clock) and the division ratio of the main system
clock can be changed.
The actual switchover operation is not performed immediately after rewriting to PCC; operation continues on the
pre-switchover clock for several clocks (see Table 6-7).
Whether the CPU is operating on the main system clock or the subsystem clock can be ascertained using bit 5
(CLS) of the PCC register.
Table 6-7. Time Required for Switchover of CPU Clock and Main System Clock Cycle Division Factor
Set Value Before
Switchover
CSS PCC2 PCC1 PCC0
CSS PCC2 PCC1 PCC0 CSS PCC2 PCC1 PCC0 CSS PCC2 PCC1 PCC0 CSS PCC2 PCC1 PCC0 CSS PCC2 PCC1 PCC0 CSS PCC2 PCC1 PCC0
0
0
0
0
0
0
0
0
1
8 clocks
0
1
0
4 clocks
0
1
1
2 clocks
1
0
0
1 clock
×
×
×
1
2 clocks
Caution Selection of the main system clock cycle division factor (PCC0 to PCC2) and switchover from the
main system clock to the subsystem clock (changing CSS from 0 to 1) should not be set
simultaneously.
Simultaneous setting is possible, however, for selection of the main system clock cycle division
factor (PCC0 to PCC2) and switchover from the subsystem clock to the main system clock
(changing CSS from 1 to 0).
Remarks 1. The number of clocks listed in Table 6-7 is the number of CPU clocks before switchover.
2. When switching the CPU clock from the subsystem clock to the main system 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
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 (see Table 6-8).
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.
CHAPTER 6 CLOCK GENERATOR
0
0
0
0
0
1
0
16 clocks
4 clocks
2 clocks
1 clock
2 clocks
10 MHz)
= 10000/32.768 ≅ 305.1 → 306 clocks
f
/f
XP
SUB
Preliminary User's Manual U17260EJ3V1UD
Set Value After Switchover
0
1
0
0
0
1
16 clocks
16 clocks
8 clocks
8 clocks
4 clocks
2 clocks
1 clock
1 clock
2 clocks
2 clocks
/2 to f
/2 (@ oscillation with f
SUB
XP
×
1
0
1
0
0
1
16 clocks
2f
/f
XP
SUB
8 clocks
f
/f
XP
SUB
4 clocks
f
/2f
XP
SUB
2 clocks
f
/4f
XP
SUB
f
/8f
XP
SUB
2 clocks
= 32.768 kHz, f
SUB
×
×
clocks
clocks
clocks
clocks
clocks
=
XP
167

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents