Protection - Renesas M16C/60 Series Hardware Manual

Hide thumbs Also See for M16C/60 Series:
Table of Contents

Advertisement

Under development
This document is under development and its contents are subject to change.
M16C/6N5 Group

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 1.9.1 shows the PRCR register. The following lists the registers protected by
the PRCR register.
• Registers protected by the PRC0 bit: CM0, CM1, CM2, PLC0, PCLKR and CCLKR registers
• Registers protected by the PRC1 bit: PM0, PM1, PM2, TB2SC, INVC0 and INVC1 registers
• Registers protected by the PRC2 bit: PD7, PD9 and S3C registers
Set the PRC2 bit to "1" (write enabled) and then write to any address, and the PRC2 bit will be set 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 and PRC1 bits are not automatically set
to "0" by writing to any address. They can only be set to "0" in a program.
Protect register
b7
b6
b5
b4
b3
b2
0 0
0
Note: 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 1.9.1 PRCR Register
Rev.1.00
2003.05.30
page 66
b1
b0
Symbol
PRCR
Bit symbol
PRC0
Protect bit 0
PRC1
Protect bit 1
PRC2
Protect bit 2
-
Reserved bit
(b5-b3)
-
Nothing is assigned. When write, set to "0".
(b7-b6)
When read, its content is indeterminate.
Address
After reset
000A
XX000000
16
Bit name
Enable write to CM0, CM1, CM2,
PLC0, PCLKR, CCLKR
registers
0 : Write protected
1 : Write enabled
Enable write to PM0, PM1, PM2,
TB2SC, INVC0, INVC1
registers
0 : Write protected
1 : Write enabled
Enable write to PD7, PD9, S3C
registers
0 : Write protected
1 : Write enabled (Note)
Set to "0"
Protection
2
Function
RW
RW
RW
RW
RW
-

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/6n5

Table of Contents