
8. Clock Generation Circuits
8.2
CPU Clock and BCLK
(BCLK) as internal clocks. The CPU clock drives the CPU, and also used for the bus access to the internal ROM
and RAM. BCLK is used for the bus access to the peripheral functions and as the watchdog timer count source.
In single-speed mode, the CPU clock has the same phase and frequency as BCLK. In double-speed mode, BCLK
is the CPU clock divided by 2.
After reset, the MCU operates in single-speed mode while both the CPU clock and BCLK are the main clock
divided by 8.
The main clock, sub clock, on-chip oscillator clock, or PLL clock can be selected as the clock source for the CPU
clock.
When the main clock, on-chip oscillator clock, or PLL clock is selected as the clock source of the CPU clock, the
selected clock divided by the value set using bits MCD4 to MCD0 in the MCD register becomes the CPU clock.
When the MCU enters stop mode or low-power consumption mode (except when the on-chip oscillator clock is the
CPU clock source), bits MCD4 to MCD0 are set to 01000b (divide-by-8 mode). Therefore, next time the CPU
clock source is switched to the main clock, the CPU clock is the main clock divided by 8. Refer to 8.5 Power 8.3
Peripheral Function Clock
The peripheral function clock is the source clock or the count source for peripheral functions excluding the
watchdog timer.
When using the PLL clock for the CPU clock or the peripheral function clock, set the PM35 bit in the PM3 register
to 1 (peripheral function clock source (fPFC) divided by 2).
8.3.1
f1, f8, f32, and f2n
f1, f8, and f32 are the main clock or on-chip oscillator clock, divided by 1, 8, or 32, when the PM35 bit in the
PM3 register is set to 0 (peripheral function clock source (fPFC) not divided). When using the PLL clock, set
the PM35 bit in the PM3 register to 1. In this case, f1, f8, and f32 are the PLL clock divided by 2, 16, or 64.
Bits PM27 and PM 26 in the PM2 register select a f2n count source from fPFC or fPFC divided by 2, XIN clock
(fXIND), and the on-chip oscillator clock (fROC). Bits CNT3 to CNT0 in the TCSPR register set a f2n divide
value. (Divided by 2n, n=1 to 15. No division when n = 0.)
If the CM02 bit is set to 1 (peripheral function clock stops in wait mode) to enter wait mode, fPFC stops.
f1, f8 and f2n are used as the source clock for the serial I/O and the count source of timer A and timer B. f1 is
also used as the source clock for the intelligent I/O and CAN module.
8.3.2
fAD
fAD is the source clock for the A/D converter. When the PM35 bit in the PM3 register is 0, fAD has the same
frequency as fPFC, and when the PM35 bit in the PM3 register to 1, fAD is fPFC divided by 2.
If the CM02 bit is set to 1 (peripheral function clock stops in wait mode) to enter wait mode, fAD stops.
8.3.3
fC32
fC32 is the sub clock divided by 32. fC32 is used as the count source for timer A and timer B. fC32 is available
if the sub clock is running.