11. Protection - Renesas M16C/62P Series Hardware Manual

6-bit single-chip microcomputer
Table of Contents

Advertisement

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

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
0 0
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
REJ09B0185-0241
http://www.xinpian.net
Symbol
Address
000Ah
PRCR
Bit Symbol
Bit Name
Protect Bit 0
PRC0
Protect Bit 1
PRC1
Protect Bit 2
PRC2
Protect Bit 3
PRC3
Reserved Bit
(b5-b4)
Nothing is assigned. When w rite, set to "0".
(b7-b6)
When read, their contents are indeterminate.
Page 105 of 390
提供单片机解密、IC解密、芯片解密业务
After Reset
XX000000b
Function
Enable w rite to CM0, CM1, CM2, PLC0 and PCLKR
registers
0 : Write protected
1 : Write enabled
Enable w rite to PM0, PM1, PM2, TB2SC, INVC0 and
INVC1 registers
0 : Write protected
1 : Write enabled
Enable w rite to PD9, S3C and S4C registers
0 : Write protected
(1)
1 : Write enabled
Enable w rite to VCR2 and D4INT registers
0 : Write protected
1 : Write enabled
Set to "0"
11. Protection
RW
RW
RW
RW
RW
RW
010-62245566 13810019655

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/62pM16c/62pt

Table of Contents