English
Language : 

M16C26 Datasheet, PDF (204/239 Pages) Renesas Technology Corp – 16-BIT CMOS SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/20 SERIES
Udenvdeelropment
Preliminary Specifications Rev. 0.9
Specifications in this manual are tentative and subject to change.
CPU Rewrite Mode (Flash Memory Version)
M16C/26 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Block Erase Command (2016/D016)
By writing the command code “2016” in the first bus cycle and the confirmation command code “D016”
in the second bus cycle that follows to the block address of a flash memory block, the system initiates
an auto erase (erase and erase verify) operation.
Whether the auto erase operation is completed can be confirmed by reading the status register or the
flash memory control register 0. At the same time the auto erase operation starts, the read status
register mode is automatically entered, so the content of the status register can be read out. The
status register bit 7 (SR7) is set to 0 at the same time the auto erase operation starts and is returned
to 1 upon completion of the auto erase operation. In this case, the read status register mode remains
active until the Read Array command (FF16) or Read Lock Bit Status command (7116) is written or the
flash memory is reset using its reset bit.
The RY/BY status flag of the flash memory control register 0 is 0 during auto erase operation and 1
when the auto erase operation is completed as is the status register bit 7.
After the auto erase operation is completed, the status register can be read out to know the result of
the auto erase operation. For details, refer to the section where the status register is detailed.
Figure 1.20.4 shows an example of a block erase flowchart.
Each block of the flash memory can be protected against erasure by using a lock bit. For details, refer
to the section where the data protect function is detailed.
During EW1 mode, do not execute this command on blocks in which the control program is stored.
Start
Write 2016
Write D016
Block address
Status register
read
(Set an address to even address in the
user ROM area when write 2016 )
(Set an address to even address in the user
ROM area when reading the status register)
SR7=1?
or
RY/BY=1?
NO
YES
Error
Check full status check
(Note 1)
Erase error (Note 2)
Block erase
completed
Note 1: Refer to Figure 1.20.6
Note 2: If the error occurs, try to execute clear status register command,
then block erase command at least three times until erase error
disappears.
Figure 1.20.4. Block erase flowchart
198
Renesas Technology Corp.