
R01UH0218EJ0110 Rev.1.10
Page 115 of 664
Sep 12, 2011
R32C/142 Group and R32C/145 Group
7. Clock Generator
7.1.2
Sub Clock (fC)
The sub clock is generated by the sub clock oscillator. This clock can be a clock source for the CPU
clock and a count source for timers A and B. It can be output from the CLKOUT pin.
The sub clock oscillator is configured with pins XCIN and XCOUT connected by a crystal oscillator. The
circuit has a on-chip feedback resistor which is separated from the oscillator in stop mode to save
power consumption. An external clock can be applied to the XCIN pin. Figure 7.12 shows an example
of a sub clock circuit connection. Circuit constants vary depending on the oscillator. Circuit constants
should be set as per the oscillator manufacturer’s recommendations.
After a reset, the sub clock is stopped and the feedback resistor is separated from the oscillator. In
order to start the sub clock oscillation, first set bits PD8_6 and PD8_7 in the PD8 register to 0 (input
mode), and the PU25 bit in the PUR2 register to 0 (pull-up resistor disabled). Then, set the CM04 bit in
the CM0 register to 1 (XCIN-XCOUT oscillator).
To input an external clock to the XCIN pin, bits PD8_7 and PU25 should be set to 0, then the CM04 bit
should be set to 1. The clock applied to the XCIN pin becomes a clock source for the sub clock.
When the CM3 register is set to 00h (fC) and the BCS bit in the CCR register is set to 1 (fC, fOCO4, or
f256) after the sub clock oscillation has stabilized, the sub clock becomes the base clock of the CPU
clock and the peripheral bus clock.
All clocks, including the sub clock, stop in stop mode. Refer to
7.7 “Power Control” for details.
Figure 7.12 Sub Clock Circuit Connection
XCIN
XCOUT
CCIN
CCOUT
Oscillator
Rcd (1)
MCU
(feedback resistor embedded)
XCIN
XCOUT
MCU
(feedback resistor embedded)
External clock
Open
VCC
VSS
Note:
1. Insert a damping resistor if required. Resistance values vary according to oscillator setting. Values
recommended by the manufacturer should be set. A feedback resistor should be placed between XCIN
and XCOUT if the manufacturer recommends placing a resistor externally.