![](http://datasheet.mmic.net.cn/30000/M30201F2T-FP_datasheet_2358646/M30201F2T-FP_130.png)
130
Under
development
Mitsubishi microcomputers
M30201 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
CPU Rewrite Mode
Preliminary
Command
Program verify
Read
Program
03B616
First bus cycle
Second bus cycle
0016
4016
C016
Write
Program
address
Write
Read
Erase verify
A016
Write
Verify
address
Verify
data
Read
Erase
2016
Write
03B616
2016
Write
Verify
address
Reset
FF16
Write
Mode
Address
Mode
Address
Data
(D0 to D7)
Data
(D0 to D7)
03B616
Program
data
Verify
data
FF16
Write
03B616
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 (0016)
The read mode is entered by writing the command code “0016” 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 (D0–D7), 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 (4016)
The program mode is entered by writing the command code “4016” 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.,
STE instruction) in the second bus cycle, the flash memory control circuit executes the program op-
eration. The program operation requires approximately 20 ms. Wait for 20 ms or more before the user
go to the next processing.
During program operation, the watchdog timer remains idle, with the value “7FFF16” set in it.
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.