English
Language : 

M30218 Datasheet, PDF (155/179 Pages) Mitsubishi Electric Semiconductor – M30218 Group
CPU Rewrite Mode
Mitsubishi microcomputers
M30218 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
CPU Rewrite Mode
In CPU rewrite mode, the on-chip flash memory can be operated on (read, program, or erase) under control
of the Central Processing Unit (CPU). In CPU rewrite mode, the flash memory can be operated on by
reading or writing to the flash memory control register and flash command register. Figure BB-1, Figure BB-
2 show the flash memory control register, and flash command register respectively.
Also, in CPU rewrite mode, the CNVSS pin is used as the VPP power supply pin. Apply the power supply
voltage, VPPH, from an external source to this pin.
In CPU rewrite mode, only the user ROM area shown in Figure AA-3 can be rewritten; the boot ROM area
cannot be rewritten. Make sure the program and block commands are issued for only the user ROM area.
The control program for CPU rewrite mode can be stored in either user ROM or boot ROM area. In the CPU
rewrite mode, because the flash memory cannot be read from the CPU, the rewrite control program must
be transferred to internal RAM before it can be executed.
Flash memory control register 0
b7 b6 b5 b4 b3 b2 b1 b0
0
0
Symbol
FCON0
Address
03B416
Bit symbol
Bit name
FCON00 CPU rewrite mode
select bit
Reserved bit
FCON02 CPU rewrite mode
monitor flag
Reserved bit
FCON04 Erase / program
area select bit
FCON05
FCON06
Reserved bit
When reset
001000002
Function
0: CPU rewrite mode is invalid
1: CPU rewrite mode is valid
RR WW
This bit can not write. The value, if
read, turns out to be indeterminate.
0: CPU rewrite mode is invalid
1: CPU rewrite mode is valid
Must always be set to "0".
b6b5b4
000: Block 3 program/erase
001: Block 2 program/erase
010: Block 1 program/erase
011: Block 0 program/erase
110: Block 0 to 3 erase
111: Inhibit
Must always be set to "0".
Flash memory control register 1
b7 b6 b5 b4 b3 b2 b1 b0
00
Symbol
FCON1
Address
03B516
When reset
XXXXXX002
Bit symbol
Reserved bit
Bit name
Function
Must always be set to "0".
Nothing is assigned. In an attempt to write these bits, write "0". The
value, if read, turns out to be indeterminate.
Figure BB-1. Flash memory control register
RR WW
Flash command register
b7 b6 b5 b4 b3 b2 b1 b0
Symbol
FCMD
Address
03B616
When reset
0016
Function
Writing of software command
<Software command name>
•Read command
•Program command
•Program verify command
•Erase command
•Erase verify command
•Reset command
<Command code>
"0016"
"4016"
"C016"
"2016" +"2016"
"A016"
"FF16" +"FF6"
Figure BB-2. Flash command register
RR WW
154