CPU Rewrite Mode
Specifications in this manual are tentative and subject to change
Rev. E
MITSUBISHI MICROCOMPUTERS
M30245 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
196
Precautions
Operation speed
During CPU rewrite mode, set the main clock frequency as shown below using the main clock
division select bits (bit 6 at address 000616, and bits 6 and 7 at address 000716):
6.25 MHz or less when wait bit (bit 7 at address 000516) = 0 (without internal access wait state)
12.5 MHz or less when wait bit (bit 7 at address 000516) = 1 (with internal access wait state)
Prohibited Instructions
The UND, INTO, JMPS, JSRS, and BRK instructions cannot be used during CPU rewrite mode
because they refer to the internal data of the flash memory.
Prohibited Interrupts
The address match interrupt cannot be used during CPU rewrite mode because it refers to the
internal data of the flash memory. If the interrupt’s vector is in the variable vector table, it can be
used by transferring the vector into the RAM area.
The NMI and watchdog timer interrupts can be used to change the CPU rewrite mode select bit
forcibly to normal mode (FMR01=”0") when the interrupt occurs. If the rewrite operation is
stopped when the NMI or watchdog timer interrupts occurs, the CPU rewrite mode select bit
should be set to “1” and the erase/program operation should be repeated.
Reset
Reset input is always accepted.
Access
To set the CPU rewrite mode select bit, and the lock bit disable bit to “1”, the user must write a
“0” and then a “1”. This sequence must be followed to set this bit to “1”. This is necessary to
ensure that no interrupt or DMA transfer will be executed during the interval.
Write to the CPU rewrite mode select bit when NMI pin is a “H” level.
Access disable
Write the CPU rewrite mode select bit, and the user ROM area select bit in an area other than the
internal flash memory.
Writing in the user ROM area
If power is lost while rewriting blocks that contain the flash rewrite program with the CPU rewrite
mode, the blocks may not be correctly rewritten. Afterwards, it is possible that the flash memory
can not be rewritten. Therefore, use the standard serial I/O mode or parallel I/O mode to rewrite
these blocks.
Using the lock bit
In CPU rewrite mode, use a program that can set and clear the lock bit disable bit (FMR02).