Unde
deeopmen
CPU Rewrite Mode
Peimnay
Mitsubishi microcomputers
M30201 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
127
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 CNV
SS
pin is used as the V
PP
power supply pin. Apply the power supply
voltage, V
PP
H, 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
FCON0
Address
03B4
16
When reset
00100000
2
W
R
A
A
b7
b6
b5
b4
b3
b2 b1
b0
CPU rewrite mode
select bit
FCON00
Bit symbol
Bit name
Function
R W
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".
Nothing is assigned. In an attempt to write this bit, write "0". The value,
if read, turns out to be "0".
FCON02
0
A
A
A
A
A
Reserved bit
0
1
Must always be set to "1".
Reserved bit
0
A
A
Must always be set to "0".
Reserved bit
Flash memory control register 1
Symbol
FCON1
Address
03B5
16
When reset
XXXXXX00
2
W
R
A
A
b7
b6
b5
b4
b3
b2 b1
b0
Bit symbol
Bit name
Function
R W
0
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".
Flash command register
Symbol
FCMD
Address
03B6
16
When reset
00
16
R
b7
b6
b5
b4
b3
b2 b1
b0
Writing of software command
<Software command name>
Read command
Program command
Program verify command
Erase command
Erase verify command
Reset command
<Command code>
"00
16
"
"40
16
"
"C0
16
"
"20
16
"
+
"20
16
"
"A0
16
"
"FF
16
"
+
"FF
6
"
Function
RW
A
Figure BB-2. Flash command register