![](http://datasheet.mmic.net.cn/30000/M30280M8V-XXXHP_datasheet_2358818/M30280M8V-XXXHP_330.png)
19. Flash Memory Version
page 310
0
9
3
f
o
7
0
2
,
0
3
.r
a
M
0
1
.
1
.
v
e
R
0
1
0
-
7
8
2
0
B
9
0
J
E
R
).
r
e
v
-
V
/.
r
e
v
-
T
(
p
u
o
r
G
8
2
/
C
6
1
M
19.7.5 Block Erase
Auto erase operation (erase and verify) start in the specified block by writing xx2016 in the first bus cycle
and xxD016 to the highest-order even addresse of a block in the second bus cycle.
The FMR00 bit in the FMR0 register indicates whether the auto-erase operation has been completed.
The FMR00 bit is set to 0 (busy) during the auto-erase and 1 (ready) when the auto-erase operation is
completed.
When using the erase-suspend function in EW mode 0, verify whether a flash memory has entered erase
suspend mode, by the FMR46 bit in the FMR4 register. The FMR46 bit is set to 0 during auto-erase
operation and 1 when the auto-erase operation is completed (entering erase-suspend).
After the completion of an auto-erase operation, the FMR07 bit in the FMR0 register indicates whether or
not the auto-erase operation has been successfully completed. (Refer to 19.8.4 Full Status Check).
Also, each block can disable erasing. (Refer to Table 19.4).
Figure 19.11
shows a flow chart of the block erase command programming when not using the erase-
suspend function. Figure 19.12 shows a flow chart of the block erase command programming when
using an erase-suspend function.
In EW mode 1, do not execute this command on the block where the rewrite control program is allocated.
In EW mode 0, the MCU enters read status register mode as soon as the auto-erase operation starts and
the status register can be read. The SR7 bit in the status register is set to 0 at the same time the auto-
erase operation starts. This bit is set to 1 when the auto-erase operation is completed. The MCU remains
in read status register mode until the read array command is written.
When the erase error occurs, execute the clear status register command and block erase command at
leaset three times until an erase error does not occur.
Figure 19.11 Flow Chart of Block Erase Command (when not using erase suspend function)
Write xxD016 to the highest-order
block address (1)
Start
Block erase completed
YES
NO
Write command code xx2016(1)
FMR00 = 1?
Full status check (2,3)
NOTES:
1. Write the command code and data at even address.
2. Refer to Figure 19.13.
3. Execute the clear status register command and block erase command at least 3 times
until an erase error is not generated when an erase error is generated.