Software Commands - Renesas M16C/60 Series Hardware Manual

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

Software Commands

Software commands are described below. The command code and data must be read and written in 16-bit
unit, to and from even addresses in the user ROM area. When writing command code, the high-order 8
bits (D
to D
) are ignored. Table 1.22.4 lists the software commands.
15
8
Table 1.22.4 Software Commands
Software command
Read array
Read status register
Clear status register
Program
Block erase
Erase all unlocked block (Note 1)
Lock bit program
Read lock bit status
Note 1: It is only blocks 0 to 8 that can be erased by the Erase All Unlocked Block command.
Block A cannot be erased. Use the Block Erase command to erase block A.
Note 2: Note that the commands in the second bus cycle are different from those of the existing M16C/6N1 group.
The lock bit status is output to the FMR16 bit of the FMR1 register. Read this bit: "0" (locked), "1" (unlocked)
SRD: Status register data (D
WA: Write address (Make sure the address value specified in the first bus cycle is the same even address as the
write address specified in the second bus cycle.)
WD: Write data (16 bits)
BA:
Uppermost block address (even address, however)
✕:
Any even address in the user ROM area
x:
High-order 8 bits of command (ignored)
Read Array Command (FF
This command reads the flash memory.
Writing "xxFF
16
address in the next or subsequent bus cycles, and the content of the specified address can be read in
16-bit unit.
Because the microcomputer remains in read array mode until another command is written, the contents
of multiple addresses can be read in succession.
Read Status Register Command (70
This command reads the status register.
Write "xx70
" in the first bus cycle, and the status register can be read in the second bus cycle. (Refer
16
to "Status Register.") When reading the status register too, specify an even address in the user ROM
area.
Do not execute this command in EW1 mode.
Rev.1.00
2003.05.30
page 270
Mode
Write
Write
Write
Write
Write
Write
Write
Write
to D
)
7
0
)
16
" in the first bus cycle places the microcomputer in read array mode. Enter the read
)
16
First bus cycle
Data
Address
(D
to D
)
15
0
xxFF
16
xx70
16
xx50
16
WA
xx40
16
xx20
16
xxA7
16
BA
xx77
16
xx71
16
Flash Memory
Second bus cycle
Data
Mode
Address
(D
15
-
-
Read
SRD
-
-
Write
WA
WD
Write
BA
xxD0
Write
xxD0
Write
BA
xxD0
Write
BA
xxD0
to D
)
0
-
-
16
16
16
(Note 2)
16

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/6n5

Table of Contents