English
Language : 

M32C80 Datasheet, PDF (100/352 Pages) Renesas Technology Corp – 16/32-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M32C/80 SERIES
M32C/80 Group
9. Protection
9. Protection
The protection function protects important registers from being easily overwritten when a program runs out of
control.
Figure 9.1 shows the PRCR register. Each bit in the PRCR register protects the following registers:
• The PRC0 bit protects the CM0, CM1, CM2, MCD, PLC0 and PLC1 registers;
• The PRC1 bit protects the PM0, PM1, PM2, INVC0 and INVC1 registers;
• The PRC2 bit protects the PD9 and PS3 registers;
The PRC2 bit is set to "0" (write disabled) when data is written to a desired address after setting the PRC2
bit to "1" (write enabled). Set the PD9 and PS3 registers immediately after setting the PRC2 bit in the
PRCR register to "1" (write enabled). Do not generate an interrupt or a DMA transfer between the instruc-
tion to set to the PRC2 bit to "1" and the following instruction. The PRC1 and PRC0 bits are not set to "0"
even if data is written to desired addresses. Set the PRC1 and PRC0 bits to "0" by program.
Protect Register
b7 b6 b5 b4 b3 b2 b1 b0
Symbol
PRCR
Address
000A16
After Reset
XXXX 00002
Bit
Symbol
Bit Name
PRC0 Protect Bit 0
Function
RW
Enables writing to CM0, CM1, CM2,
MCD, PLC0, PLC1 registers
0: Write disabled
RW
1: Write enabled
PRC1 Protect Bit 1
PRC2 Protect Bit 2(1)
Enables writing to PM0, PM1, PM2,
INVC0, INVC1 registers
0: Write disabled
RW
1: Write enabled
Enables writing to PD9, PS3 registers
0: Write disabled
RW
1: Write enabled
(b3) Reserved Bit
Set to "0"
RW
Nothing is assigned. When write, set to "0".
(b7 - b4) When read, its content is indeterminate.
NOTE:
1. The PRC2 bit is set to "0" by writing into a desired address after the PRC2 bit is set to "1".
The PRC1 and PRC0 bits are not automatically set to "0". Set them to "0" by program.
Figure 9.1 PRCR Register
Rev. 1.00 Nov. 01, 2005 Page 81 of 330
REJ09B0271-0100