English
Language : 

M16C65 Datasheet, PDF (756/829 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/60
Under development
M16C/65 Group
Preliminary Specification
This is a preliminary specification and is subject to change.
30. Flash Memory
Full status check
FMR06 =1
and
FMR07=1?
NO
FMR07=0?
YES
Command
sequence error
NO
Erase error
YES
FMR06=0?
NO
Program error
Full status check
completed
FMR07, FMR06: Bits in the FMR0 register
(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.
(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 FMR0
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) Execute (1), (2), and (3) at least 3 times until an erase error is not generated.
NOTE: If an error still occurs, do not use that block.
[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. 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 error has occurred, before executing the program command to write to
the same address again.
(3) Execute the program command again.
NOTE: If an error 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
NOTE: If an error occurs, do not use that block.
Note: When either FMR06 or FMR07 bit is set to 1 (terminated by error), the program, block erase, lock bit program, block blank check, and read
lock bit status commands cannot be accepted. Execute the clear status register command before executing each command.
Figure 30.8 Full Status Check and Handling Procedure for Errors
REJ09B0484-0030 Rev.0.30 Sep 09, 2008
Page 721 of 791