How To Use Oscillation Stop And Re-Oscillation Detect Function - Renesas M16C/62P Series Hardware Manual

6-bit single-chip microcomputer
Table of Contents

Advertisement

M16C/62P Group (M16C/62P, M16C/62PT)
10.6.3

How to Use Oscillation Stop and Re-oscillation Detect Function

The oscillation stop and re-oscillation detect interrupt shares the vector with the watchdog timer interrupt
and low voltage detection interrupt. If the oscillation stop, re-oscillation detection and watchdog timer
interrupts both are used, read the CM22 bit in an interrupt routine to determine which interrupt source is
requesting the interrupt.
Where the main clock re-oscillated after oscillation stop, the clock source for the CPU clock and peripheral
functions must be switched to the main clock in the program. Figure 10.12 shows the Procedure to Switch
Clock Source From On-chip Oscillator to Main Clock.
Simultaneously with oscillation stop, re-oscillation detection interrupt occurrence, the CM22 bit becomes
"1". When the CM22 bit is set at "1," oscillation stop, re-oscillation detection interrupt are disabled. By
setting the CM22 bit to "0" in the program, oscillation stop, re-oscillation detection interrupt are enabled.
If the main clock stops during low speed mode where the CM20 bit is "1", an oscillation stop, re-oscillation
detection interrupt request is generated. At the same time, the on-chip oscillator starts oscillating. In this
case, although the CPU clock is derived from the sub clock as it was before the interrupt occurred, the
peripheral function clocks now are derived from the on-chip oscillator clock.
To enter wait mode while using the oscillation stop, re-oscillation detection function, set the CM02 bit to
"0" (peripheral function clocks not turned off during wait mode).
Since the oscillation stop, re-oscillation detection function is provided in preparation for main clock stop
due to external factors, set the CM20 bit to "0" (Oscillation stop, re-oscillation detection function disabled)
where the main clock is stopped or oscillated in the program, that is where the stop mode is selected or the
CM05 bit is altered.
This function cannot be used if the main clock frequency is 2 MHz or less. In that case, set the CM20 bit to
"0".
NO
NOTES:
1. If the clock source for CPU clock is to be changed to PLL clock, set to PLL operation mode
Figure 10.12
Procedure to Switch Clock Source From On-chip Oscillator to Main Clock
Rev.2.41
Jan 10, 2006
REJ09B0185-0241
http://www.xinpian.net
Switch the main clock
Determine several times whether
the CM23 bit is set to "0"
(main clock oscillates)
Set the CM06 bit to "1"
(divide-by-8)
Set the CM22 bit to "0"
(main clock does not stop)
Set the CM21 bit to "0"
(main clock as CPU clock source)
End
after set to high-speed mode.
Page 104 of 390
提供单片机解密、IC解密、芯片解密业务
YES
(1)
CM06 bit : Bit in CM0 register
CM21 to CM23 bits : Bits in CM2 register
10. Clock Generation Circuit
010-62245566 13810019655

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/62pM16c/62pt

Table of Contents