English
Language : 

M16C1N Datasheet, PDF (50/238 Pages) Renesas Technology Corp – RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/10 SERIES
M16C/1N Group
6. Clock Generation Circuit
6.6.1 Oscillation Stop Detection Bit (CM20)
You can start the oscillation stop detection by setting this bit to "1" and CM21=1 (oscillation stop
detection interrupt enabled). The detection is not executed when this bit is set to "0" or in reset status.
Be sure to set this bit to "0" before setting for the stop-mode. Set this bit again to "1" after release from
stop-mode. Set this bit to "0" also before setting the main clock stop bit (bit 5 at address 000616) to "1".
Do not set this bit to "1" if the frequency of XIN is lower than 2 MHz.
An oscillation stop is detected if CM02="1" (peripheral function clock has been set for stop in wait
mode) and the mode is shifted to wait.
6.6.2 Oscillation Stop Detection Interrupt Enable Bit (CM21)
When CM20=1 and CM21=1, an oscillation stop detection interrupt is generated if an abnormal stop of
XIN is detected. The on-chip oscillator starts operation instead of the XIN clock which stopped abnor-
mally. The operation goes further with the main clock supplied from the on-chip oscillator. For the
oscillation stop detection interrupt, judgment on the interrupt condition is necessary, because this
interrupt shares the vector table with watchdog timer interrupt. Figure 6.12 shows flow of the judgment
with oscillation stop detection interrupt processing program.
6.6.3 Main Clock Switch Bit (CM22)
When setting this bit to "1", the on-chip oscillator is selected as main clock. At this time, the on-chip
oscillator starts simultaneously if it has been stopped (CM14=1). This bit is cleared only when CM23 is
"0" (when XIN is oscillating).
If an oscillation stop is detected while both CM20 and CM21 are "1", this bit automatically switches to
"1".
When this bit is set to "1", the on-chip oscillation stop bit (bit 4 at address 000716) is automatically set
to "0".
6.6.4 Clock Monitor Bit (CM23)
You can see the operation status of the XIN clock. When this bit is "0", XIN is operating correctly. You
can check the oscillation status of XIN when an oscillation stop detection interrupt is generated or after
reset.
When oscillation stop detection is invalid (CM20="0"), the clock monitor bit is "0".
Rev.1.00 Oct 20, 2004 page 38 of 222
REJ09B0007-0100Z