R8C/13 Group
6.3 CPU Clock and Peripheral Function Clock
6.3 CPU Clock and Peripheral Function Clock
There are two types of clocks: CPU clock to operate the CPU and peripheral function clock to operate the
peripheral functions. Also refer to “Figure 6.1 Clock Generating Circuit”.
6.3.1 CPU Clock
This is an operating clock for the CPU and watchdog timer.
The clock source for the CPU clock can be chosen to be the main clock or on-chip oscillator clock.
The selected clock source can be divided by 1 (undivided), 2, 4, 8 or 16 to produce the CPU clock. Use
the CM06 bit in the CM0 register and the CM17 to CM16 bits in the CM1 register to select the divide-
by-n value.
After reset, the low-speed on-chip oscillator clock divided by 8 provides the CPU clock.
Note that when entering stop mode from high or middle speed mode, the CM06 bit is set to “1” (divide-
by-8 mode).
6.3.2 Peripheral Function Clock (f1, f2, f8, f32, fAD, f1SIO, f8SIO, f32SIO, fRING, fRING128)
These are operating clocks for the peripheral functions.
Of these, fi (i=1, 2, 8, 32) is derived from the main clock or on-chip oscillator clock by dividing them by
i. The clock fi is used for timers X, Y, Z and C.
The clock fjSIO (j=1, 8, 32) is derived from the main clock or on-chip oscillator clock by dividing them by
j. The clock fjSIO is used for serial interface.
The fAD clock is produced from the main clock or the on-chip oscillator clock and is used for the A/D
converter.
When the WAIT instruction is executed after setting the CM02 bit in the CM0 register to “1” (peripheral
function clock turned off during wait mode), the clocks fi, fjSIO, and fAD are turned off.
6.3.3 fRING and fRING128
These are operating clocks for the peripheral functions.
The fRING runs at the same frequency as the on-chip oscillator, and can be used as the souce for the
timer Y. The fRING128 is derived from the fRING by dividing it by 128, and can be used for Timer C.
When the WAIT instruction is executed, the clocks fRING and fRING128 are not turned off.
6.3.4 fRING-fast
This is used as the count source for the timer C. The fRING-fast is derived from the high-speed on-chip
oscillator and provided by setting the HR00 bit to “1” (high-speed on-chip oscillator on).
When the WAIT instruction is executed, the clock fRING-fast is not turned off.
Rev.1.20 Jan 27, 2006 page 36 of 205
REJ09B0111-0120