CPU Rewrite Mode (Flash Memory Version)
deeopmen
Preliminary Specifications REV.E
Specifications in this manual are tentative and subject to change.
Mitsubishi microcomputers
M30220 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
175
Command
Program
Clear status register
Read array
Read status register
X
X
X
X
(Note 3)
First bus cycle
Second bus cycle
FF
16
70
16
50
16
40
16
Write
Write
Write
Write
X
SRD
Read
Write
Erase all block
X
20
16
Write
X
20
16
Write
(Note 2)
WA
(Note 3)
WD
(Note 3)
Block erase
X
20
16
Write
D0
16
Write
BA
(Note 4)
Mode
Address
Mode
Address
Data
(D
0
to D
7
)
Data
(D
0
to D
7
)
(Note 5)
Note 1: When a software command is input, the high-order byte of data (D
8
to D
15
) is ignored.
Note 2: SRD = Status Register Data
Note 3: WA = Write Address, WD = Write Data
Note 4: BA = Block Address (Enter the maximum address of each block that is an even address.)
Note 5: X denotes a given address in the user ROM area (that is an even address).
Cycle number
1
2
1
2
2
2
Software Commands
Table 1.23.1 lists the software commands available with the M30220 (flash memory version).
After setting the CPU rewrite mode select bit to 1, write a software command to specify an erase or
program operation. Note that when entering a software command, the upper byte (D
8
to D
15
) is ignored.
The content of each software command is explained below.
Table 1.23.1. List of software commands (CPU rewrite mode)
Read Array Command (FF
16
)
The read array mode is entered by writing the command code “FF
16
” in the first bus cycle. When an
even address to be read is input in one of the bus cycles that follow, the content of the specified
address is read out at the data bus (D
0
–D
15
), 16 bits at a time.
The read array mode is retained intact until another command is written.
Read Status Register Command (70
16
)
When the command code “70
16
” is written in the first bus cycle, the content of the status register is
read out at the data bus (D
0
–D
7
) by a read in the second bus cycle.
The status register is explained in the next section.
Clear Status Register Command (50
16
)
This command is used to clear the bits SR4 to SR5 of the status register after they have been set.
These bits indicate that operation has ended in an error. To use this command, write the command
code “50
16
” in the first bus cycle.