English
Language : 

M16C62P_06 Datasheet, PDF (120/421 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/60 SERIES
M16C/62P Group (M16C/62P, M16C/62PT)
11. Protection
11. Protection
Note
The M16C/62PT do not use the PRC3 bit in the PRCR register.
In the event that a program runs out of control, this function protects the important registers so that they will not be
rewritten easily. Figure 11.1 shows the PRCR Register. The following lists the registers protected by the PRCR
register.
• The PRC0 bit protects the CM0, CM1, CM2, PLC0 and PCLKR registers;
• The PRC1 bit protects the PM0, PM1, PM2, TB2SC, INVC0 and INVC1 registers;
• The PRC2 bit protects the PD9, S3C and S4C registers;
• The PRC3 bit protects the VCR2 and D4INT registers.
Set the PRC2 bit to “1” (write enabled) and then write to any address, and the PRC2 bit will be cleared to “0” (write
protected). The registers protected by the PRC2 bit should be changed in the next instruction after setting the PRC2 bit
to “1”. Make sure no interrupts or DMA transfers will occur between the instruction in which the PRC2 bit is set to
“1” and the next instruction. The PRC0, PRC1 and PRC3 bits are not automatically cleared to “0” by writing to any
address. They can only be cleared in a program.
Protect Register
b7 b6 b5 b4 b3 b2 b1 b0
00
Symbol
PRCR
Address
000Ah
Bit Symbol
Bit Name
Protect Bit 0
PRC0
After Reset
XX000000b
Function
RW
Enable w rite to CM0, CM1, CM2, PLC0 and PCLKR
registers
0 : Write protected
RW
1 : Write enabled
PRC1
Protect Bit 1
Enable w rite to PM0, PM1, PM2, TB2SC, INVC0 and
INVC1 registers
0 : Write protected
RW
1 : Write enabled
Protect Bit 2
Enable w rite to PD9, S3C and S4C registers
PRC2
0 : Write protected
RW
1 : Write enabled (1)
Protect Bit 3
Enable w rite to VCR2 and D4INT registers
PRC3
0 : Write protected
RW
1 : Write enabled
—
Reserved Bit
Set to “0”
(b5-b4)
RW
—
Nothing is assigned. When w rite, set to “0”.
(b7-b6) When read, their contents are indeterminate.
—
NOTES :
1. The PRC2 bit is set to “0” by w riting to any address after setting it to “1”. Other bits are not set to “0” by w riting to
any address, and must therefore be set in a program.
Figure 11.1 PRCR Register
Rev.2.41 Jan 10, 2006 Page 105 of 390
REJ09B0185-0241