
CPU Rewrite Mode (Flash Memory Version)
deeopmen
Preliminary Specifications REV.E
Specifications in this manual are tentative and subject to change.
Mitsubishi microcomputers
M30220 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
173
End
Start
Execute read array command or reset flash
memory by setting flash memory reset bit (by
writing “1” and then “0” in succession) (Note 4)
Single-chip mode, or boot mode (Note 1)
Set processor mode register (Note 2)
Using software command execute erase,
program, or other operation
Jump to transferred control program in RAM
(Subsequent operations are executed by control
program in this RAM)
Transfer CPU rewrite mode control
program to internal RAM
Note 1: Apply 5V ± 10 % to CNV
SS
pin by confirmation of CPU rewrite mode entry flag when started operation
with single-chip mode.
Note 2: During CPU rewrite mode, set the main clock frequency as shown below using the main clock divide ratio
select bit (bit 6 at address 0006
16
and bits 6 and 7 at address 0007
16
):
5.0 MHz or less when wait bit (bit 7 at address 0005
16
) = “0” (without internal access wait state)
10.0 MHz or less when wait bit (bit 7 at address 0005
16
) = “1” (with internal access wait state)
Note 3: For CPU rewrite mode select bit to be set to “1”, the user needs to write a “0” and then a “1” to it in
succession. When it is not this procedure, it is not enacted in “1”. This is necessary to ensure that no
interrupt or DMA transfer will be executed during the interval.
Note 4: Before exiting the CPU rewrite mode after completing erase or program operation, always be sure to
execute a read array command or reset the flash memory.
Write “0” to CPU rewrite mode select bit
Set CPU rewrite mode select bit to “1” (by
writing “0” and then “1” in succession)(Note 3)
Check the CPU rewrite mode entry flag
*1
*1
Program in ROM
Program in RAM
Figure 1.23.2. CPU rewrite mode set/reset flowchart