Flash Memory
277
Mitsubishi microcomputers
M16C / 62P Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
development
Preliminary Specifications Rev.1.0
Specifications in this manual are tentative and subject to change.
Write ‘xxD0
16
’ to the uppermost
block address
Start
Lock bit program completed
YES
NO
Note: Write the command code and data at even number.
Write command code ‘xx77
16
’ to
the uppermost block address
FMR00=1
Full status check
Erase All Unlocked Block
Write ‘xxA7
16
’ in the first bus cycle and write ‘xxD0
16
’ in the second bus cycle, and all blocks except
block A will be erased successively, one block at a time.
Check the FMR0 register’s FMR00 bit to see if auto erasing has finished. The result of the auto erase
operation can be known by inspecting the FMR0 register’s FMR07 bit.
Each block can be protected against erasing by a lock bit. (Refer to “Data Protect Function.”)
In EW1 mode, do not execute this command when the lock bit for any block = 1 (unlocked) in which the
rewrite control program is stored, or when the FMR0 register’s FMR02 bit = 1 (lock bit disabled).
In EW0 mode, the microcomputer goes to read status register mode at the same time auto erasing
starts, making it possible to read the status register. The status register bit 7 (SR7) is cleared to “0” at
the same time auto erasing starts, and set back to “1” when auto erasing finishes. In this case, the
microcomputer remains in read status register mode until the Read Array or Read Lock Bit Status
command is written next.
Note that only blocks 0 to 12 can be erased by the Erase All Unlocked Block command. Block A
cannot be erased. Use the Block Erase command to erase block A.
Lock Bit Program Command (77
16
/D0
16
)
This command sets the lock bit for a specified block to “0” (locked).
Write ‘xx77
16
’ in the first bus cycle and write ‘xxD0
16
’ to the uppermost address of a block (even
address, however) in the second bus cycle, and the lock bit for the specified block is cleared to “0”.
Make sure the address value specified in the first bus cycle is the same uppermost block address that
is specified in the second bus cycle.
Figure 1.27.10 shows an example of a lock bit program flowchart. The lock bit status (lock bit data) can
be read using the Read Lock Bit Status command.
Check the FMR0 register’s FMR00 bit to see if writing has finished.
For details about the lock bit function, and on how to set the lock bit to “1”, refer to “Data Protect
Function.”
Figure 1.27.10. Lock Bit Program Command