English
Language : 

M16C30P_07 Datasheet, PDF (76/317 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/30 SERIES
M16C/30P Group
10. Protection
10. 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 10.1 shows the PRCR Register. The following lists the registers protected by the PRCR
register.
• The PRC0 bit protects the CM0, CM1 and PCLKR registers;
• The PRC1 bit protects the PM0 and PM1 registers;
• The PRC2 bit protects the PD9 register;
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 and PRC1 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
000
Symbol
Address
PRCR
000Ah
Bit Symbol
Bit Name
Protect Bit 0
PRC0
After Reset
XX000000b
Function
RW
Enable w rite to CM0, CM1 and PCLKR registers
0 : Write protected
RW
1 : Write enabled
Protect Bit 1
Enable w rite to PM0 and PM1 registers
PRC1
0 : Write protected
RW
1 : Write enabled (1)
Protect Bit 2
Enable w rite to PD9 register
PRC2
0 : Write protected
RW
1 : Write enabled (1)
—
Reserved Bit
Set to “0”.
(b5-b3)
RW
—
Nothing is assigned. When w rite, set to “0”. When read, its content is
(b7-b6) indeterminate.
—
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 10.1 PRCR Register
Rev.1.22 Mar 29, 2007 Page 60 of 291
REJ09B0179-0122