R8C/20 Group, R8C/21 Group 11. Protection
Rev.2.00 Aug 27, 2008 Page 86 of 458
REJ09B0250-0200
11. Protection
Protection function protects important registers from being easily overwritten when a program runs out of control.
Figure 11.1 shows the PRCR Register. The following lists the registers protected by the PRCR register.
• Registers protected by PRC0 bit: CM0, CM1, OCD, FRA0, FRA1 and FRA2 registers
• Registers protected by PRC1 bit: PM0 and PM1 registers
• Registers protected by PRC2 bit: PD0 register
• Registers protected by PRC3 bit: VCA2, VW1C and VW2C registers
Figure 11.1 PRCR Register
Protect Register
Symbol Address After Reset
PRCR
000Ah 00h
Bit Symbol Bit Name Function RW
NOTE:
1.
This bit is set to 0 after w riting 1 to the PRC2 bit and executing w riting to any address.
Since the other bits are not set to 0, set to 0 by a program.
—
(b7-b6)
Reserved bits When read, the content is 0.
RO
RW
—
(b5-b4)
Reserved bits Set to 0
RW
PRC3
Protect bit 3 Writing to the VCA2, VW1C and VW2C registers is
enabled
0 : Disables w riting
1 : Enables w riting
b7 b6 b5 b4 b3 b2 b1 b0
00
PRC0 RW
PRC1 RW
Protect bit 0 Writing to the CM0, CM, OCD, FRA0, FRA1 and
FRA2 registers is enabled
0 : Disables w riting
1 : Enables w riting
Protect bit 1 Writing to the PM0 and PM1 registers is enabled
0 : Disables w riting
1 : Enables w riting
PRC2
Protect bit 2 Writing to the PD0 register is enabled
0 : Disables w riting
1 : Enables w riting
(1)
RW