Datasheet
M16C/6S Group Flash Memory Version
R01DS0201EJ0502 Rev.5.02 page 175 of 203
Dec 25, 2012
Write ‘xxD016’ to the uppermost
block address
Start
Block erase completed
YES
NO
Note: Write the command code and data at even number.
Write the command code ‘xx2016’
FMR00=1?
Full status check
Figure 1.21.5. Block Erase Command
Block Erase
Write ‘xx2016’ in the first bus cycle and write ‘xxD016’ to the uppermost address of a block (even
address, however) in the second bus cycle, and an auto erase operation (erase and verify) will start.
Check the FMR0 register’s FMR00 bit to see if auto erasing has finished.
The FMR00 bit is “0” during auto erasing and set to “1” when auto erasing is completed.
Check the FMR0 register’s FMR07 bit after auto erasing has finished, and the result of auto erasing
can be known. (Refer to “Full Status Check.”)
Moreover, when FMR02 bit of FMR0 register is “0” (rewriting is disable), the block erase command to
block 0 and block 1 is not received.
Figure 1.21.5 shows an example of a block erase flowchart.
Each block can be protected against erasing by a lock bit. (Refer to “Data Protect Function.”)
Writing over already programmed addresses is inhibited.
In EW1 mode, do not execute this command on any address at which the rewrite control program is
located.
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.