Mitsubishi Electric M32R Series User Manual page 160

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

Advertisement

6
(2) Page Program command
Flash memory is programmed one page at a time, each page consisting of 256 bytes (lower
addresses H'00 to H'FF). To write data to the flash memory (i.e., to program the flash memory),
write the program command H'4141 to any address of the internal flash memory and then the
program data to the address to which you want to write.
With the Page Program command, you cannot write to the protected blocks.
Page Program is automatically performed by the internal control circuit, and the completion of
programming can be verified by checking the Flash Status Register 1 (FSTAT1) FSTAT bit.
(Refer to Section 6.4.2, "Flash Status Registers.") While the FSTAT bit = 1, the next
programming can not be performed.
(3) Lock Bit Program command
Flash memory can be protected against program/erase one block at a time. The Lock Bit
Program command is provided for protecting memory blocks.
Write the Lock Bit Program command data H'7777 to any address of the internal flash memory.
Next, write the Verify command data H'D0D0 to the last even address of the block you want to
protect, and this memory block is protected against program/erase. To remove protection,
disable lock bit-effectuated protection using the Flash Control Register 2 (FCNT2) FPROT bit
(see Section 6.4.3, "Flash Control Registers") and erase the block whose protection you want to
remove. (The content of this memory block is also erased.)
The table below lists the target blocks and their specified addresses when writing the Verify
command data.
6.5 Programming of the Internal Flash Memory
6-26
INTERNAL MEMORY
Ver.0.10

Advertisement

Table of Contents
loading

Table of Contents