Renesas M16C Laptop User Manual


 
Rev.1.10 Jul 01, 2005 page 252 of 318
REJ09B0124-0110
M16C/6N Group (M16C/6NK, M16C/6NM) 20. Flash Memory Version
Under development
This document is under development and its contents are subject to change.
Figure 20.9 Block Erase Command
20.3.5.5 Block Erase Command
The block erase command erases each block.
By writing xx20h in the first bus cycle and xxD0h to the highest-order even address of a block in the
second bus cycle, an auto erase operation (erase and verify) will start in the specified block.
The FMR00 bit in the FMR0 register indicates whether an auto erase operation has been completed.
The FMR00 bit is set to 0 (busy) during auto erase and to 1 (ready) when the auto erase operation is
completed.
After the completion of an auto erase operation, the FMR07 bit in the FMR0 register indicates whether
or not the auto erase operation has been completed as expected. (Refer to 20.3.8 Full Status Check.)
Figure 20.9 shows a flow chart of the block erase command programming.
The lock bit protects each block from being programmed inadvertently. (Refer to 20.3.6 Data Protect
Function.)
In EW1 mode, do not execute this command on the block where the rewrite control program is allocated.
In EW0 mode, the microcomputer enters read status register mode as soon as an auto erase operation
starts. The status register can be read. The SR7 bit in the status register is set to 0 at the same time an
auto erase operation starts. It is set to 1 when an auto erase operation is completed. The micro-
computer remains in read status register mode until the read array command or read lock bit status
command is written.
Write "xxD0h" to the highest-order
block address
Start
YES
NO
FMR00=1?
Full status check
Block erase operation is
completed
Write the command code "xx20h"
NOTE:
1.Write the command code and data to even addresses.