
R01UH0218EJ0110 Rev.1.10
Page 121 of 664
Sep 12, 2011
R32C/142 Group and R32C/145 Group
7. Clock Generator
7.4
CPU Clock and Peripheral Bus Clock
The CPU operating clock is referred to as the CPU clock. The CPU clock after a reset is the base clock
divided by 2.
The CPU clock source is the base clock and the divide ratio is selected by setting bits CCD1 and CCD0 in
the CCR register. The base clock divided by 2 to 4 becomes the peripheral bus clock. Its divide ratio is
selected by setting bits PCD1 and PCD0 in the CCR register. The peripheral bus clock also functions as
count source for the watchdog timer and operating clock for the serial bus interface and for the CAN
module.
When the CPU becomes out of control, to prevent the CPU clock whose clock source is the PLL clock
from stopping, the CM05 bit in the CM0 register should be set to 0 (main clock oscillator enabled) and the
BCS bit in the CCR register should be set to 0 (PLL clock selected as base clock source). Then the
following should be set.
(1) Set the PRC1 bit in the PRCR register to 1 (write enabled to the PM2 register).
(2) Set the PM21 bit in the PM2 register to 1 (clock change disabled).
7.5
Peripheral Clock
The peripheral clock is an operating clock or a count source for peripheral functions excluding the
watchdog timer, the serial bus interface, and the CAN module. The source of this clock is generated by a
clock, which has the same frequency as the PLL clock, divided by 2, 4, 6, or 8 according to the settings of
bits PM36 and PM35 in the PM3 register. The peripheral clock is classified into three types of clock as
follows:
(1) f1, f8, f32, f2n
f1, f8, and f32 are the peripheral clock sources divided by 1, 8, and 32, respectively. The clock source
for f2n is selected between the peripheral clock source and the main clock by setting the PM26 bit in
the PM2 register. The f2n divide ratio can be set using bits CNT3 to CNT0 in the TCSPR register (n = 1
to 15, not divided when n = 0).
f1, f8, f32, and f2n, whose clock source is the peripheral clock source, stop in low power mode or when
the CM02 bit is set to 1 (peripheral clock source stopped in wait mode) to enter wait mode.
f1, f8, and f2n are used as a count source for timers A and B or an operating clock for the serial
interface and the LIN module. f1 is used as an operating clock for the intelligent I/O as well. The f32 is
used as an operating clock for the LIN module as well.
(2) fAD
fAD, which has the same frequency as peripheral clock source, is an operating clock for the A/D
converter.
This clock stops in low power mode or when the CM02 bit is set to 1 (peripheral clock source stopped in
wait mode) to enter wait mode.
(3) fC32
fC32, which is a sub clock divided by 32, or on-chip oscillator clock divided by 128, is used as the count
source for timers A and B. This clock is available when the sub clock or on-chip oscillator clock is
active.