Renesas M16C/64A Series User Manual page 74

Table of Contents

Advertisement

M16C/64A Group
PRC6, PRC3, PRC1, PRC0 (Protect bits 6, 3, 1, 0) (b6, b3, b1, b0)
When setting bits PRC6, PRC3, PRC1, and PRC0 to 1 (write enabled), these bits remain 1 (write
enabled). To change registers protected by these bits, follow these steps:
(1)
Set the PRCi bit to 1. (i = 0, 1, 3, 6)
(2)
Write to the register protected by the PRCi bit.
(3)
Set the PRCi bit to 0 (write protected).
PRC2 (Protect bit 2) (b2)
After setting the PRC2 bit to 1 (write enabled), by writing to a given SFR, the PRC2 bit becomes 0.
Change the registers protected by the PRC2 bit in the next instruction after setting the PRC2 bit to 1.
The steps are shown below. Make sure there are no interrupts or DMA transfers between steps (1) and
(2).
(1)
Set the PRC2 bit to 1.
(2)
Write to the register protected by the PRC2 bit.
R01UH0136EJ0210 Rev.2.10
Jul 31, 2012
5. Protection
Page 41 of 800

Advertisement

Table of Contents
loading

Table of Contents