Renesas M16C/64A Series User Manual page 721

Table of Contents

Advertisement

M16C/64A Group
30.8.6.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.
Note:
1. Do not use the lock bit in EW1 mode. When an error occurs in EW1 mode, skip step (2).
R01UH0136EJ0210 Rev.2.10
Jul 31, 2012
(1)
30. Flash Memory
(1)
Page 688 of 800

Advertisement

Table of Contents
loading

Table of Contents