
CPU Rewrite Mode
195
Specifications in this manual are tentative and subject to change
Rev. E
MITSUBISHI MICROCOMPUTERS
M30245 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Erase status (SR5)
The erase status indicates the operating status of an auto erase to the CPU. It is set to “1” when
an erase error occurs. The erase status is reset to “0” when cleared.
Program status (SR4)
The program status indicates the operating status of an auto write to the CPU. It is set to “1”
when a write error occurs. The program status is reset to “0” when cleared.
When an erase command is in error, which occurs if the command entered after the block erase
command (2016) is not the confirmation command (D016), both the program status and erase
status (SR5) are set to “1”.
If the program status or erase status = “1”, the following commands entered by command write
are not accepted and SR4 and SR5 are set to “1” (command sequence error):
(1) A valid command is not entered correctly
(2) The data entered in the second bus cycle of lock bit program (7716/D016), block erase (2016/
D016), or erase all unlocked blocks (A716/D016) is not the D016 or FF16. However, if FF16 is
entered, read array is assumed and the command that has been set up in the first bus cycle is
canceled.
Block status after program (SR3)
If data is overwritten (this occurs when a memory cell becomes overcharged and data incorrectly
read), “1” is set for the program status after the program at the end of the page write operation. In
other words:
When writing ends successfully, “8016” is output;
When writing fails, “9016” is output;
When excessive data is written, “8816” is output.
Full-Status Check
A full-status check allows the user to review the erase and program operations. Figure 1.147
shows a full-status check flowchart and the action to take when an error occurs.
Figure 1.147. Full-status check flowchart
Read status register
SR4=1 and
SR5=1 ?
NO
Command
sequence error
YES
SR5=0?
YES
Block erase error
NO
SR4=0?
YES
Program error (page
or lock bit)
NO
End (block erase, program)
Execute the clear status register command (5016)
to clear the status register. Try performing the
operation one more time after confirming that the
command is entered correctly.
If a block erase error occurs, the block in error
cannot be used.
Execute the read lock bit status command (7116) to
see if the block is locked. After removing the lock,
execute a write operation the same way. If the error still occurs,
the page in error cannot be used.
Note: When one of SR5 to SR3 is set to 1, none of the page program, block erase, erase all
YES
SR3=0?
Program error
(block)
NO
After erasing the block in error, exectue the operation again.
If the same error still occurs, the block in error cannot
be used.
unlocked blocks and lock bit program commands are accepted. Execute the clear
status register command (5016) before executing these commands.