
CHAPTER 5 CLOCK GENERATOR
User’s Manual U19780EJ2V0UD
154
5.6.3 Example of controlling subsystem clock
The following type of subsystem clock
Note
is available.
•
XT1 clock: Crystal/ceramic resonator is connected across the XT1 and XT2 pins.
When the subsystem clock is not used, the XT1/P123 and XT2/P124 pins can be used as I/O port pins.
Note
The 78K0/KB2-A is not provided with a subsystem clock.
Cautions 1. The XT1/P123 and XT2/P124 pins are in the I/O port mode after a reset release.
2. Do not start the peripheral hardware operation with the external clock from peripheral
hardware pins when the internal high-speed oscillation clock and high-speed system clock
are stopped while the CPU operates with the subsystem clock, or when in the STOP mode.
The following describes examples of setting procedures for the following cases.
(1) When oscillating XT1 clock
(2) When using subsystem clock as CPU clock
(3) When stopping subsystem clock
(1) Example of setting procedure when oscillating the XT1 clock
<1> Setting XT1 and XT2 pins and selecting operation mode (OSCCTL register)
When OSCSELS is set to 1, the mode is switched from port mode to XT1 oscillation mode.
<2> Waiting for the stabilization of the subsystem clock oscillation
Wait for the oscillation stabilization time of the subsystem clock by software, using a timer function.
(2) Example of setting procedure when using the subsystem clock as the CPU clock
<1> Setting subsystem clock oscillation
Note
(See
5.6.3 (1) Example of setting procedure when oscillating the XT1 clock
.)
Note
The setting of <1> is not necessary when while the subsystem clock is operating.
<2> Switching the CPU clock (PCC register)
When CSS is set to 1, the subsystem clock is supplied to the CPU.
CSS
PCC2
PCC1
PCC0
CPU Clock (f
CPU
) Selection
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
f
SUB
/2
1
Other than above
Setting prohibited