
25. Flash Memory
Figure 25.12
Full Status Check and Handling Procedure for Each Error
Start
FMR06 = 1
and
FMR07 = 1?
NO
YES
FMR07 = 0?
YES
Erase error
End
NO
Full status check starts
Command sequence error
FMR06 = 0?
YES
Program error
NO
Full status check is completed
(1) Execute the clear status register command to set bits FMR06 and FMR07 to 0
(successfully completed).
(2) Check if the command is written correctly and execute the correct command.
(1) Execute the clear status register command to set the erase status flag to 0
(successfully completed).
(2) Execute the read lock bit status command. Set the FMR02 bit in the FMR0
register to 1 (lock bit disabled) if the lock bit in the block where the error has
occurred is set to 0 (locked).
(3) Execute the block erase command again.
NOTE:
1. If an error still occurs, the block in error cannot be used.
If the lock bit is set to 1 (unlocked) in (2) above, the block
cannot be used.
[During a program operation]
(1) Execute the clear status register command to set the program status flag to 0.
(2) Execute the read lock bit status command. Set the FMR02 bit to 1 if the lock bit
in the block where the error has occurred is set to 0.
(3) Execute the program command again.
NOTE:
2. If an error still occurs, the block in error cannot be used.
If the lock bit is set to 1 in (2) above, the block cannot be used.
[During a lock bit program operation]
(1) Execute the clear status register command to set the program status flag to 0.
(2) Set the FMR02 bit to 1.
(3) Execute the block erase command to erase the block where the error has
occurred.
(4) Execute the lock bit program command again.
NOTE:
3. If an error still occurs, the block in error cannot be used.
NOTE:
4. When either FMR06 or FMR07 bit is 1 (terminated by error), the program, block erase, lock bit program, and read lock bit status
commands cannot be accepted. Execute the clear status register command before executing these commands.