Renesas M16C/64C User Manual page 74

Table of Contents

Advertisement

M16C/64C 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.
R01UH0092EJ0110 Rev.1.10
Jul 31, 2012
5. Protection
Page 41 of 807

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/60 seriesM16c series

Table of Contents