Download Print this page

Renesas M16C/50 Series User Manual page 95

Advertisement

M16C/5L Group, M16C/56 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.
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
5. Protection
Page 58 of 803

Advertisement

loading