Renesas M32R/ECU Series User Manual page 151

Mitsubishi 32-bit risc single-chip microcomputers
Table of Contents

Advertisement

6
(3) Lock Bit Program command
The internal flash memory can be protected against programming/erase operation one block at a time. The
Lock Bit Program command is provided for protecting the flash memory blocks.
Write the Lock Bit Program command (H'7777) to any address of the internal flash memory. Next, write the
Verify command (H'D0D0) to the last even address of the flash memory block to be protected, and this
memory block is thereby protected against programming/erase operation. To remove protection, use the
Flash Control Register 2 (FCNT2) FPROT bit to invalidate protection by a block bit (see Section 6.4.3, "Flash
Control Registers") and erase the flash memory block whose protection is to be removed. (The content of
that memory block is also erased.)
Executing a programming/erase operation on flash memory blocks protected by a lock bit results in an error.
If erased, the FSTAT2 register ERASE bit is set to "1" (erase error occurred); if programmed, the FSTAT2
register WRERR1 bit is set to "1" (programming error occurred).
The table below lists the target flash memory blocks and their addresses to be specified when writing the
Verify command.
Table 6.5.3 M32180F8 Target Blocks and Specified Addresses
Target Block
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
6.5 Programming the Internal Flash Memory
Specified Address
H'0000 3FFE
H'0000 5FFE
H'0000 7FFE
H'0000 FFFE
H'0001 FFFE
H'0002 FFFE
H'0003 FFFE
H'0004 FFFE
H'0005 FFFE
H'0006 FFFE
H'0007 FFFE
H'0008 FFFE
H'0009 FFFE
H'000A FFFE
H'000B FFFE
H'000C FFFE
H'000D FFFE
H'000E FFFE
H'000F FFFE
6-22
INTERNAL MEMORY
32180 Group User's Manual (Rev.1.0)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents