R8C/38T-A Group
9. Clock Generation Circuit
Under development Preliminary document
Specifications in this document are tentative and subject to change.
R01UH0241EJ0010 Rev.0.10
Page 89 of 730
Aug 05, 2011
9.2.1
System Clock Control Register 0 (CM0)
Notes:
1. The CM04 bit can be set to 1 by a program, but cannot be set to 0.
2. The CM05 bit is used to stop the XIN clock. This bit cannot be used to detect whether the XIN clock has stopped.
To stop the XIN clock, make the following settings:
(1) Set bits OCD1 and OCD0 in the OCD register to 00b (oscillation stop detection function disabled).
(2) Set bits CM42 to CM40 in the CM4 register to 001b (fLOCO clock) or 101b (fHOCO-F clock).
3. P4_6 and P4_7 can be used as I/O ports only when the CM05 bit is 1 (XIN clock stops) and the CM13 bit in the
CM1 register is 0 (P4_6 and P4_7).
4. When an external clock is input, the clock input itself is not accepted.
5. When the MCU enters stop mode, the CM06 bit is set to 1 (divide-by-8 mode).
6. When the MCU exits stop mode or wait mode, do not set the CM05 bit again if switching to the XIN clock.
Set the PRC0 bit in the PRCR register to 1 (write enabled) before rewriting the CM0 register.
Address 00008h
Bit
b7b6
b5b4b3
b2b1b0
Symbol
CM07
CM06
CM05
CM04
CM03
CM02
—
After Reset
0
010
1000
Bit
Symbol
Bit Name
Function
R/W
b0
—
Reserved
Set to 0.
R/W
b1
—
R/W
b2
CM02
Peripheral function clock stop bit in
wait mode
0: Peripheral function clock does not stop in
wait mode
1: Peripheral function clock stops in wait mode
R/W
b3
CM03
XCIN clock stop bit
0: Oscillates
1: Stops
R/W
b4
CM04
XCIN buffer external input set bit (1)
0: External clock input from XCIN
1: Xtal used
R/W
b5
CM05
XIN clock (XIN-XOUT) stop bit (2, 3)
0: Oscillates
1: Stops (4)
R/W
b6
CM06
CPU clock division ratio select bit 0 (5)
0: Bits CM16 and CM17 in CM1 register
enabled
1: Divide-by-8 mode
R/W
b7
CM07
XIN clock supply set bit (6)
0: XIN clock is supplied by oscillator (external
ceramic resonator, etc.)
1: XIN clock is supplied by external clock input
to XOUT pin
R/W