Datasheet
Section 22 Flash Memory
Page 1158 of 1408 R01UH0309EJ0500 Rev. 5.00
Sep 24, 2012
H8S/2456, H8S/2456R, H8S/2454 Group
22.4.5 Block Erase
Write H'20xx in the first bus cycle and H'D0xx to the lowest address (an even address) of the
target block in the second cycle; automatic erasure (erasing data and verifying the erased status)
starts in the specified block.
Completion of automatic erasure can be checked through the FMRDY bit in FLMSTR.
The FMRDY bit is 0 (busy) during automatic erasure and becomes 1 (ready) when erasure is
completed.
After automatic erasure is completed, the result can be checked through the FMERSF bit in
FLMSTR (see section 22.6, Full Status Check).
Figure 22.4 shows a flowchart of the block erase command processing.
In the EW0 mode, the read status register mode is entered as soon as automatic erasure starts, and
the status register can be read. The SR7 bit in the status register becomes 0 when automatic
erasure starts and returns to 1 when erasure is completed. In this case, the flash memory stays in
the read status register mode until a read array command is issued. If an erase error occurs, repeat
a sequence of the clear status register command to block erase command at least three times until
no erase error occurs.