R01UH0092EJ0110 Rev.1.10
Page 698 of 807
Jul 31, 2012
M16C/64C Group
30. Flash Memory
30.8.7.2
Handling Procedure for Errors
When errors occur, follow the procedures below.
Do not execute the program, block erase, lock bit program, and block blank check commands when
either FMR06 or FMR07 bit is 1 (completed in error). Execute each command after executing the
clear status register command.
Command sequence error
(1) Execute the clear status register command and set bits FMR06 and FMR07 to 0 (completed as
expected).
(2) Check if the command is written correctly and execute the correct command.
Erase error
(1) Execute the clear status register command and set the FMR07 bit to 0 (completed as expected).
(2) Execute the read lock bit status command. If the lock bit in the block where the error occurred is
set to 0 (locked), set the FMR02 bit in the FMR register to 1 (lock bit disabled).
(3) Execute the block erase command again.
(4) Repeat (1) to (3) until an erase error is not generated.
If an error still occurs even after repeating three times, do not use that block.
When handling an erase error of the block blank check command and erasing is not necessary,
execute (1) only.
Program error
[When a program operation is executed]
(1) Execute the clear status register command and set the FMR06 bit to 0 (completed as expected).
(2) Execute the read lock bit status command. If the lock bit in the block where the error occurred is
set to 0, set the FMR02 bit in the FMR0 register to 1.
(3) Execute the program command again.
If the lock bit is set to 1 (unlocked), do not use the address in which error has occurred as it is.
Execute the block erase command to erase the block, in which the error has occurred, before
executing the program command to write to the same address again.
If an error still occurs, do not use that block.
[When a lock bit program operation is executed]
(1) Execute the clear status register command and set the FMR06 bit to 0.
(2) Set the FMR02 bit in the FMR0 register to 1.
(3) Execute the block erase command to erase the block where the error occurred.
(4) Execute the lock bit program command again after writing the data as needed.
If an error still occurs, do not use that block.
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...