Renesas M16C/62P Series Hardware Manual page 101

6-bit single-chip microcomputer
Table of Contents

Advertisement

M16C/62P Group (M16C/62P, M16C/62PT)
Oscillation Stop Detection Register
b7 b6 b5 b4
b3 b2 b1 b0
0 0
NOTES :
1.
Rew rite this register after setting the PRC0 bit in the PRCR register to "1" (w rite enable).
2.
When the CM20 bit is set to "1" (oscillation stop, re-oscillation detection function enabled), the CM27 bit is set to "1"
(oscillation stop, re-oscillation detection interrupt), and the CPU clock source is the main clock, the CM21 bit is set to
"1" (on-chip oscillator clock) if the main clock stop is detected.
3.
If the CM20 bit is set to "1" and the CM23 bit is set to "1" (main clock stops), do not set the CM21 bit to "0".
This bit is set to "1" w hen the main clock stop is detected and the main clock re-oscillation is detected. When this
4.
flag changes state from "0" to "1", an oscillation stop or a re-oscillation detection interrupt is generated. Use this bit in
an interrupt routine to determine the factors of interrupts betw een the oscillation stop and re-oscillation detection
interrupt and the w atchdog timer interrupt. This bit is set to "0" by w riting "0" in a program. (This bit remains
unchanged even if w riting "1". Nor is it set to "0" w hen an oscillation stop or a re-oscillation detection interrupt
request is acknow ledged.)
When the CM22 bit is set to "1" and an oscillation stop or a re-oscillation is detected, an oscillation stop or a re-
oscillation detection interrupt is not generated.
Determine the main clock status by reading the CM23 bit several times in an oscillation stop or a re-oscillation
5.
detection interrupt routine
6.
This bit is valid w hen the CM07 bit in the CM0 register is set to "0".
7.
When the PM21 bit in the PM2 register is set to "1" (disable clock modification), this bit remains unchanged even if
w riting to the CM20 bit.
8.
Where the CM20 bit is set to "1" (oscillation stop, re-oscillation detection function enabled), the CM27 bit is "1"
(oscillation stop, re-oscillation detection interrupt), and the CM11 bit is set to "1" (PLL clock is selected as the CPU
clock source), the CM21 bit remains unchanged even if a main clock stop is detected. When the CM22 bit is set to
"0" under these conditions, an oscillation stop, a re-oscillation detection interrupt request is generated at main clock
stop detection. Set the CM21 bit to "1" (on-chip oscillator clock) in the interrupt routine.
9.
Set the CM20 bit to "0" (disabled) before entering stop mode. Exit stop mode before setting the CM20 bit back to "1"
(enabled).
10.
Set the CM20 bit in the CM2 register to "0" (disabled) before setting the CM05 bit in the CM0 register to "1" (main clock
stops).
11.
The CM20, CM21 and CM27 bits remain unchanged at the oscillation stop detection reset.
12.
When the CM21 bit is set to "0" (on-chip oscillator stops) and the CM05 bit is set to "1" (main clock stops), the CM06
bit is fixed to "1" (divide-by-8 mode) and the CM15 bit is fixed to "1" (drive capacity High).
Figure 10.4
CM2 Register
Rev.2.41
Jan 10, 2006
REJ09B0185-0241
http://www.xinpian.net
(1)
Symbol
Address
000Ch
CM2
Bit Symbol
Bit Name
Oscillation Stop,
Re-Oscillation Detection
CM20
(7, 9, 10,11)
Enable Bit
System Clock Select Bit 2
(2, 3, 6, 8, 11, 12)
CM21
Oscillation Stop,
Re-Oscillation Detection
CM22
(4)
Flag
XIN Monitor Flag
CM23
Reserved Bit
(b5-b4)
Nothing is assigned. When w rite, set to "0".
(b6)
When read, its content is "0".
Operation Select Bit
(w hen an oscillation stop,
CM27
re-oscillation is detected)
Page 86 of 390
提供单片机解密、IC解密、芯片解密业务
0: Oscillation stop, re-oscillation detection
function disabled
1: Oscillation stop, re-oscillation detection
function enabled
0: Main clock or PLL clock
1: On-chip oscillator clock
(On-chip oscillator oscillates)
0: Main clock stops, re-oscillation not
detected
1: Main clock stops, re-oscillation detected
(5)
0: Main clock oscillates
1: Main clock stops
Set to "0"
0: Oscillation stop detection reset
1: Oscillation stop, re-oscillation detection
(11)
interrupt
10. Clock Generation Circuit
After Reset
(11)
0X000000b
Function
010-62245566 13810019655
RW
RW
RW
RW
RO
RW
RW

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/62pM16c/62pt

Table of Contents