Renesas M16C/62P Hardware Manual page 273

Renesas 16-bit single-chip microcomputer
Hide thumbs Also See for M16C/62P:
Table of Contents

Advertisement

M16C/62P Group (M16C/62P, M16C/62PT)
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 opera-
tion 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 25.9 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).
Figure 22.10 Lock Bit Program Command
R
e
. v
2
3 .
0
S
e
p
0
, 1
2
0
0
4
R
E
J
0
9
B
0
1
8
5
0 -
2
3
0
Z
Write the command code "xx77h" to
the highest-order block address
Write "xxD0h" to the highest-order
Lock bit program operation
NOTES:
1. Write the command code and data to even addresses.
page 259
f o
3
6
4
Start
block address
NO
FMR00=1?
YES
Full status check
is completed
22. Flash Memory Version

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/62pt

Table of Contents