154
CPU Rewrite Mode
Under
development
Tentative Specifications REV.A
Specifications in this manual are tentative and subject to change.
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
Symbol
Address
When reset
FCON0
03B416
001000002
W
R
b7
b6
b5
b4
b3
b2 b1
b0
CPU rewrite mode
select bit
FCON00
Bit symbol
Bit name
Function
RW
0: CPU rewrite mode is invalid
1: CPU rewrite mode is valid
This bit can not write. The value, if
read, turns out to be indeterminate.
Reserved bit
CPU rewrite mode
monitor flag
0: CPU rewrite mode is invalid
1: CPU rewrite mode is valid
Must always be set to "0".
FCON02
Reserved bit
0
000: Block 0 program/erase
001: Block 1 program/erase
010: Block 2 program/erase
011: Block 3 program/erase
110: Block 0 to 3 erase
111: Inhibit
0
Must always be set to "0".
Reserved bit
Flash memory control register 1
Symbol
Address
When reset
FCON1
03B516
XXXXXX002
W
R
b7
b6
b5
b4
b3
b2 b1
b0
Bit symbol
Bit name
Function
RW
0
Reserved bit
Nothing is assigned. In an attempt to write these bits, write "0". The
value, if read, turns out to be indeterminate.
Must always be set to "0".
FCON04
FCON05
FCON06
b6b5b4
Erase / program
area select bit
Flash command register
Symbol
Address
When reset
FCMD
03B616
0016
W
R
b7
b6
b5
b4
b3
b2 b1
b0
Writing of software command
<Software command name>
<Command code>
Read command
"0016"
Program command
"4016"
Program verify command
"C016"
Erase command
"2016" +"2016"
Erase verify command
"A016"
Reset command
"FF16" +"FF6"
Function
RW
Figure BB-1. Flash memory control register
Figure BB-2. Flash command register