Protection - Renesas M16C FAMILY series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C FAMILY series:
Table of Contents

Advertisement

M
1
6
C
2 /
8
G
o r
u
p
(
M
1
6
C

8. Protection

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 8.1 shows the PRCR register. The following lists the registers protected by
the PRCR register.
• Registers protected by PRC0 bit: CM0, CM1, CM2, LPCC1, PLC0, ROCR and PCLKR registers
• Registers protected by PRC1 bit: PM0, PM1, PM2, TB2SC, INVC0 and INVC1 registers
• Registers protected by PRC2 bit: PD9 , PACR, S4C and NDDR registers
• Registers protected by PRC3 bit: VCR2 and D4INT registers
The PRC2 bit is set to "0" (write enabled) if data is written to the SFR area after setting the PRC2 bit to "1"
(write enable). Set the PD9, PACR, S4C and NDDR registers immediately after setting the PRC2 bit in the
PRCR register to "1" (write enable). Do not generate an interrupt or a DMA transfer between the instruction
to set the PRC2 bit to "1" and the following instruction. The PRC0, PRC1 and PRC3 bits are not set to "0"
even if data is written to the SFR area. Set the PRC0, PRC1 and PRC3 bits to "0" by program.
Protect Register
b7
b6
b5
b4
b3
0
0
NOTE:
1. The PRC2 bit is set to "0" if data is written to the SFR area after the PRC2 bit is set to "1". The
PRC0, PRC1 and PRC3 bits are not automatically set to "0". Set them to "0" by program.
Figure 8.1 PRCR Register
R
e
. v
2
0 .
0
J
a
. n
3
, 1
2
0
0
7
R
E
J
0
9
B
0
0
4
7
0 -
2
0
0
2 /
, 8
M
1
6
C
2 /
8
) B
b2
b1
b0
Symbol
PRCR
Bit Symbol
PRC0
Protect Bit 0
PRC1
Protect Bit 1
PRC2
Protect Bit 2
PRC3
Protect Bit 3
Reserved Bit
(b5-b4)
Nothing is assigned. When write, set to "0". When read, its
content is indeterminate.
(b7-b6)
page 66
f o
3
8
5
Address
After Reset
000A
XX000000
16
2
Bit Name
Enable write to CM0, CM1, CM2,
LPCC1, ROCR, 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, PACR
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"
8. Protection
Function
RW
RW
RW
RW
(1)
RW
RW

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tiny seriesM16c series

Table of Contents