Rev.1.00
May 18, 2004
page 271 of 296
M306V7MG/MH/MJ/MJA-XXXFP, M306V7FG/FH/FJ/FJAFP
7.2.4 Precautions on CPU Rewrite Mode
Described below are the precautions to be observed when rewriting the flash memory in CPU rewrite
mode.
(1) Operation speed
During CPU rewrite mode, set the main clock frequency 6.25 MHz using the main clock divide ratio
select bit (bit 6 at address 000616 and bits 6 and 7 at address 000716.)
(2) Instructions inhibited against use
The instructions listed below cannot be used during CPU rewrite mode because they refer to the
internal data of the flash memory:
UND instruction, INTO instruction, JMPS instruction, JSRS instruction, and BRK instruction
(3) Interrupts inhibited against use
The address match interrupt cannot be used during CPU rewrite mode because they refer to the
internal data of the flash memory. If interrupts have their vector in the variable vector table, they can be
used by transferring the vector into the RAM area. The watchdog timer interrupts each can be used to
change the flash memory’s operation mode forcibly to read array mode upon occurrence of the inter-
rupt. Since the rewrite operation is halted when the watchdog timer interrupts occur, the erase/pro-
gram operation needs to be performed over again.
Disabling erase or rewrite operations for address FC00016 to address FFFFF16 in the user ROM block
disables these operations for all subsequent blocks as well. Therefore, it is recommended to rewrite
this block in the standard serial I/O mode.
(4) Reset
Reset input is always accepted. After a reset, the addresses 06000016 through (flash memory start
address-1) are made a reserved area and cannot be accessed. Therefore, if your product has this
area in the user ROM area, do not write any address of this area to the reset vector.
(5) Access disable
Write CPU rewrite mode select bit, user ROM area select bit and USER/OSD change bit in an area
other than the internal flash memory.
(6) How to access
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.
(7) Change time
When change an access area from USER/OSD change bit's, insert the waiting time about 50 clock
cycle until access of an object area is attained.