Unde
CPU Rewrite Mode
Peimnay
STE instruction) in the second bus cycle, the flash memory control circuit executes the program op-
eration. The program operation requires approximately 20
μ
s. Wait for 20
μ
s or more before the user
go to the next processing.
During program operation, the watchdog timer remains idle, with the value “7FFF
16
” set in it.
deeopmen
Mitsubishi microcomputers
M30201 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
130
Command
Program verify
Read
Program
03B6
16
First bus cycle
Second bus cycle
00
16
40
16
C0
16
Write
Write
Write
Program
address
Write
Read
Erase verify
A0
16
Write
Verify
address
Verify
data
Read
Erase
20
16
Write
03B6
16
20
16
Write
Verify
address
Reset
FF
16
Write
Mode
Address
Mode
Address
Data
(D
0
to D
7
)
Data
(D
0
to D
7
)
03B6
16
03B6
16
03B6
16
03B6
16
03B6
16
Program
data
Verify
data
FF
16
Write
03B6
16
Software Commands
Table BB-1 lists the software commands available with the M30201 (flash memory version).
When CPU rewrite mode is enabled, write software commands to the flash command register to specify
the operation to erase or program.
The content of each software command is explained below.
Table BB-1. List of Software Commands (CPU Rewrite Mode)
Read Command (00
16
)
The read mode is entered by writing the command code “00
16
” to the flash command register in the
first bus cycle. When an 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
7
), 8 bits at a time.
The read mode is retained intact until another command is written.
After reset and after the reset command is executed, the read mode is set.
Program Command (40
16
)
The program mode is entered by writing the command code “40
16
” to the flash command register in
the first bus cycle. When the user execute an instruction to write byte data to the desired address (e.g.,
Note 1: The write operation is not completed immediately by writing a program command once. The
user must always execute a program-verify command after each program command executed. And if
verification fails, the user need to execute the program command repeatedly until the verification
passes. See Figure 1.BB.3 for an example of a programming flowchart.