Protection - Renesas M16C/62P Hardware Manual

Renesas 16-bit single-chip microcomputer
Hide thumbs Also See for M16C/62P:
Table of Contents

Advertisement

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

11. Protection

Note
11. Protection is described in the M16C/62P only as an example.
The M16C/62PT do not used 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 automati-
cally cleared to "0" by writing to any address. They can only be cleared in a program.
Protect Register
b7
b6
b5
b4
b3
0
0
NOTES :
1. The PRC2 bit is set to "0" by writing to any address after setting it to "1". Other bits are not set to "0"
by writing to any address, and must therefore be set in a program.
Figure 11.1 PRCR Register
R
e
. v
2
3 .
0
S
e
p
0
, 1
2
0
0
4
R
E
J
0
9
B
0
1
8
5
0 -
2
3
0
Z
b2
b1
b0
Symbol
PRCR
Bit Symbol
PRC0
Protect Bit 0
PRC1
Protect Bit 1
PRC2
Protect Bit 2
Protect Bit 3
PRC3
Reserved Bit
(b5-b4)
Nothing is assigned. When write, set to "0". When read, its
content is indeterminate.
(b7-b6)
page 88
f o
3
6
4
Address
After Reset
000Ah
XX000000b
Bit Name
Enable write to CM0, CM1, CM2,
PLC0 and PCLKR registers
0 : Write protected
1 : Write enabled
Enable write to PM0, PM1, PM2,
TB2SC, INVC0 and INVC1
registers
0 : Write protected
1 : Write enabled
Enable write to PD9, S3C and
S4C registers
0 : Write protected
1 : Write enabled
Enable write to VCR2 and D4INT
registers
0 : Write protected
1 : Write enabled
Set to "0"
11. Protection
Function
RW
RW
RW
(1)
RW
RW
RW

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/62pt

Table of Contents