Datasheet
Section 17 Flash Memory (F-ZTAT Version)
Rev.7.00 Dec. 24, 2008 Page 576 of 698
REJ09B0074-0700
17.6.3 Programming/Erasing in User Program Mode
On-board programming/erasing of an individual flash memory block can also be performed in user
program mode by branching to a user program/erase control program. The user must set branching
conditions and provide on-board FWE control and supply of programming data, and storing a
program/erase control program in part of the program area as necessary. The flash memory must
contain the user program/erase control program or a program which provides the user
program/erase control program from external memory. Because the flash memory itself cannot be
read during programming/erasing, transfer the user program/erase control program to on-chip
RAM, as like in boot mode. Figure 17.10 shows a sample procedure for programming/erasing in
user program mode. Prepare a user program/erase control program in accordance with the
description in section 17.8, Flash Memory Programming/Erasing.
Yes
No
Program/erase?
Transfer user program /erase
control program to RAM
Branch to user program/erase
control in RAM
Execute user program/erase
control pogram (flash memory rewrite)
Branch to flash memory
application program
Branch to flash memory
application program
MD2 to MD0 = 110,111 Reset start
Figure 17.10 Programming/Erasing Flowchart Example in User Program Mode