Renesas M16C/60 Series Hardware Manual page 287

Hide thumbs Also See for M16C/60 Series:
Table of Contents

Advertisement

Under development
This document is under development and its contents are subject to change.
M16C/6N5 Group
Erase All Unlocked Block
Write "xxA7
" in the first bus cycle and write "xxD0
16
block A will be erased successively, one block at a time.
Check the FMR0 register's FMR00 bit to see if auto erasing has finished. The result of the auto erase
operation can be known by inspecting the FMR0 register's FMR07 bit.
Each block can be protected against erasing by a lock bit. (Refer to "Data Protect Function".)
In EW1 mode, do not execute this command when the lock bit for any block = 1 (unlocked) in which the
rewrite control program is stored, or when the FMR0 register's FMR02 bit = 1 (lock bit disabled).
In EW0 mode, the microcomputer goes to read status register mode at the same time auto erasing
starts, making it possible to read the status register. The status register bit 7 (SR7) is set to "0" at the
same time auto erasing starts, and set back to "1" when auto erasing finishes. In this case, the
microcomputer remains in read status register mode until the Read Array or Read Lock Bit Status
command is written next.
Note that only blocks 0 to 8 can be erased by the Erase All Unlocked Block command. Block A cannot
be erased. Use the Block Erase command to erase block A.
Lock Bit Program Command (77
This command sets the lock bit for a specified block to "0" (locked).
Write "xx77
" in the first bus cycle and write "xxD0
16
address, however) in the second bus cycle, and the lock bit for the specified block is set to "0". Make
sure the address value specified in the first bus cycle is the same uppermost block address that is
specified in the second bus cycle.
Figure 1.22.10 shows an example of a lock bit program flowchart.
The lock bit status (lock bit data) can be read using the Read Lock Bit Status command.
Check the FMR0 register's FMR00 bit to see if writing has finished.
For details about the lock bit function, and on how to set the lock bit to "1", refer to "Data Protect
Function".
Figure 1.22.10 Lock Bit Program Command
Rev.1.00
2003.05.30
page 273
/D0
)
16
16
Start
Write command code "xx77
the uppermost block address
Write "xxD0
" to the uppermost
16
block address
FMR00=1?
YES
Full status check
Lock bit program completed
Note: Write the command code and data at even number .
" in the second bus cycle, and all blocks except
16
" to the uppermost address of a block (even
16
" to
16
NO
Flash Memory

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/6n5

Table of Contents