English
Language : 

M16C65 Datasheet, PDF (159/829 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/60
Under development
M16C/65 Group
Preliminary Specification
This is a preliminary specification and is subject to change.
8. Clock Generator
8.7.3 Using the Oscillation Stop, Re-Oscillation Detect Function
• The oscillation stop/re-oscillation detect interrupt shares a vector with the watchdog timer interrupt,
voltage monitor 1 interrupt, and voltage monitor 2 interrupt. If the oscillation stop/re-oscillation
detection interrupt is used with a watchdog timer interrupt, voltage monitor 1 interrupt, or voltage
monitor 2 interrupt, read the CM22 bit (oscillation stop/re-oscillation detection), VW1C2 bit (Vdet1
passage detection), VW2C2 bit (Vdet2 passage detection) and VW2C3 bit (watchdog timer
underflow detection) in an interrupt routine to determine which interrupt source is requesting the
interrupt.
• After oscillation stop is detected, if the main clock re-oscillates, set the main clock back to the clock
source for the CPU clock and peripheral functions by a program. Figure 8.6 shows the Procedure
to Switch Clock Source from On-Chip Oscillator to Main Clock.
Switch the main clock
Main clock stopped
Determine several times whether
the CM23 bit is set to 0
(main clock oscillates)
Main clock oscillating
Set the CM06 bit to 1
(divide-by-8)
Set the CM22 bit to 0
(main clock stop, re-oscillation not detected)
Set the CM21 bit to 0
(main clock or PLL clock)
Figure 8.6
End
CM06 bit
: Bit in the CM0 register
Bits CM21 to CM23 : Bits in the CM2 register
Procedure to Switch Clock Source from On-Chip Oscillator to Main Clock
• The CM22 bit becomes 1 at the same time an oscillation stop/re-oscillation detection interrupt is
generated. When the CM22 bit is 1, the oscillation stop/re-oscillation detection interrupt is disabled.
When setting the CM22 bit to 0 by a program, the oscillation stop/re-oscillation detection interrupt
is enabled.
REJ09B0484-0030 Rev.0.30 Sep 09, 2008
Page 124 of 791