English
Language : 

M16C Datasheet, PDF (221/262 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Preliminary Specifications REV.B
Mitsubishi microcomputers
Specifications in this manual are tentative and subject to change.
M16C / 6N Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
CPU Rewrite Mode
Block Erase Command (4116)
By writing the command code "2016" in the first bus cycle, the confirmation command code "D016" and
the block address of a flash memory block in the second bus cycle that follows, the system initiates an
auto erase (erase and erase verify) operation.
Whether or not the auto erase operation is completed can be confirmed by reading the status register
or the flash memory control register. At the same time the auto erase operation starts, the read status
register mode is automatically entered, so the content of the status register can be read out. The status
register bit 7 (SR7) is set to 0 at the same time the auto erase operation starts and is returned to 1 upon
completion of the erase operation. In this case, the read status register mode remains active until the
Read Array command (FF16) or Read Lock Bit Status command (7116) is written or the flash memory is
reset using its reset bit.
The RY/BY status flag of the flash memory control register is 0 during the auto erase operation and 1
when the auto erase operation is completed as is the status register bit 7.
After the auto erase operation is completed, the status register can be read out to know the result of the
auto erase operation. For details, refer to the section where the status register is detailed.
Figure 23-4 shows an example of a block erase flowchart.
Each block of the flash memory can be protected against erasure by using a lock bit. For details, refer
to the section where the data protect function is detailed.
Start
Write 2016
Write D016
Block address
Read status register
SR7 = 1? NO
YES
Check full status check
Block erase
completed
Figure 23-5. Block erase flowchart
221