English
Language : 

M16C6NK Datasheet, PDF (98/404 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/60 SERIES
Under development
This document is under development and its contents are subject to change.
M16C/6N Group (M16C/6NK, M16C/6NM)
9. Protection
9. 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 9.1 shows the PRCR register. The following lists the registers protected by the
PRCR register.
• The PRC0 bit protects the CM0, CM1, CM2, PLC0, PCLKR and CCLKR registers;
• The PRC1 bit protects the PM0, PM1, PM2, TB2SC, INVC0 and INVC1 registers;
• The PRC2 bit protects the PD7, PD9, S3C, S4C, S5C and S6C registers (1).
NOTE:
1. The S5C and S6C registers are only in the 128-pin version.
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 b1 b0
000
Symbol
PRCR
Address
000Ah
After Reset
XX000000b
Bit Symbol
Bit Name
PRC0 Protect Bit 0
PRC1 Protect Bit 1
PRC2 Protect Bit 2
Function
RW
Enable write to CM0, CM1, CM2,
PLC0, PCLKR, CCLKR
registers
RW
0 : Write protected
1 : Write enabled
Enable write to PM0, PM1, PM2,
TB2SC, INVC0, INVC1
registers
RW
0 : Write protected
1 : Write enabled
Enable write to PD7, PD9, S3C,
S4C, S5C, S6C registers (2)
0 : Write protected
RW
1 : Write enabled (1)
-
(b5-b3)
Reserved Bit
Set to "0"
RW
-
(b7-b6)
Nothing is assigned. When write, set to "0".
When read, their contents are indeterminate.
-
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.
2. The S5C and S6C registers are only in the 128-pin version.
Figure 9.1 PRCR Register
Rev.2.00 Nov 28, 2005 page 80 of 378
REJ09B0124-0200