English
Language : 

M16C62P_06 Datasheet, PDF (304/421 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/60 SERIES
M16C/62P Group (M16C/62P, M16C/62PT)
22. Flash Memory Version
22.3.5.6 Erase All Unlocked Block
The erase all unlocked block command erases all blocks except the block A.
By writing “xxA7h” in the first bus cycle and “xxD0h” in the second bus cycle, an auto erase (erase and verify)
operation will run continuously in all blocks except the block A.
The FMR00 bit in the FMR0 register indicates whether an auto erase operation has been 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.
The lock bit can protect each block from being programmed inadvertently. (Refer to 22.3.6 Data Protect
Function.)
In EW1 mode, do not execute this command when the lock bit for any block storing the rewrite control program
is set to “1” (unlocked) or when the FMR02 bit in the FMR0 register is set to “1” (lock bit disabled).
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” (busy) at the same time an auto erase
operation starts. It is set to “1” (ready) when an auto erase operation is completed. The microcomputer remains
in read status register mode until the read array command or read lock bit status command is written.
Only blocks 0 to 12 can be erased by the erase all unlocked block command. The block A cannot be erased. Use
the block erase command to erase the block A.
22.3.5.7 Lock Bit Program Command
The lock bit program command sets the lock bit for a specified block to “0” (locked).
By writing “xx77h” in the first bus cycle and “xxD0h” to the highest-order even address of a block in the
second bus cycle, the lock bit for the specified block is set to “0”. The address value specified in the first bus
cycle must be the same highest-order even address of a block specified in the second bus cycle.
Figure 22.12 shows a Flow Chart of the Lock Bit Program Command Programming. Execute read lock bit
status command to read lock bit state (lock bit data).
The FMR00 bit in the FMR0 register indicates whether a lock bit program operation is completed.
Refer to 22.3.6 Data Protect Function for details on lock bit functions and how to set it to “1” (unlocked).
Start
Write the command code “xx77h” to
the highest-order block address
Write “xxD0h” to the highest-order
block address
NO
FMR00=1?
YES
Full status check
Lock bit program operation
is completed
NOTES:
1. Write the command code and data to even addresses.
Figure 22.12 Lock Bit Program Command
Rev.2.41 Jan 10, 2006 Page 289 of 390
REJ09B0185-0241