Protect; Overview; Operation - Renesas M16C Series User Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C Series:
Table of Contents

Advertisement

M30240 Group

2.1 Protect

2.1.1 Overview

'Protect' is a function that causes a value held in a register to be unchanged even when a program runs
away. The following is an overview of the protect function:
(1) Registers affected by the protect function
The registers affected by the protect function are:
• System clock control registers 0, 1 (addresses 0006
(address 03DB
16
• Processor mode registers 0, 1 (addresses 0004
The values in these registers cannot be changed in write-protect state. To change values in the reg-
isters, put the individual registers in write-enabled state.
(2) Protect register
Figure 2.1 shows protect register.
Protect register
b7
b6
b5
b4
b3
b2
0
Figure 2.1:
Protect register

2.1.2 Operation

The following explains the protect operation. Figure 2.2 shows the set-up procedure.
(1) Setting "1" in the write-enable bit of system clock control registers 0 and 1 causes system clock
control register 0, system clock control register 1, and the frequency synthesizer registers (FSCCR,
FSC, FSM, FSP, FSD) to be in write-enabled state.
(2) The contents of system clock control register 0, system clock control register 1, and the frequency
synthesizer registers are changed.
(3) Setting "0" in the write-enable bit of system control registers 0 and 1 causes system clock control
register 0 and system control register 1 to be in write-inhibited state.
(4, 5, 6) To change the contents of processor mode register 0 and that of processor mode register 1,
follow the same steps as in dealing with system clock control registers.
Rev.1.00 Sep 24, 2003 Page 140 of 360
to 03DF
)
16
b1
b0
Symbol
PRCR
Bit symbol
Bit name
Enables writing to system clock registers
0 and 1 (addresses 0006
PRC0
frequency synthesizer registers
(addresses 03DB
Enables writing to processor mode
PRC1
registers 0 and 1 (addresses 0004
0005
)
16
Reserved bit
Nothing is assigned. These bits cannot be set or reset.
The value is indeterminate when read.
and 0007
), Frequency synthesizer registers
16
16
and 0005
)
16
16
Address
When reset
000A
XXXXX000
16
2
0 : Write-inhibited
, 0007
) and
16
16
1 : Write-enabled
to 03DF
)
16
16
0 : Write-inhibited
and
16
1 : Write-enabled
Always set to "0"
Protect
Function
R
W

Advertisement

Table of Contents
loading

Table of Contents