Download Print this page

Renesas M16C/50 Series User Manual page 727

Advertisement

M16C/5L Group, M16C/56 Group
26.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. Set the FMR02 bit in the FMR register to 1 (lock bit
disabled) if the lock bit in the block where the error occurred is set to 0 (locked).
(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. Set the FMR02 bit in the FMR0 register to 1 if the
lock bit in the block where the error occurred is set to 0.
(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.
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
26. Flash Memory
Page 690 of 803

Advertisement

loading