Datasheet

Table Of Contents
Section 19 Flash Memory (F-ZTAT Version)
REJ09B0140-0900 Rev. 9.00 Page 649 of 846
Sep 16, 2010
H8S/2215 Group
19.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 19.8 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 19.8, Flash Memory Programming/Erasing.
Ye s
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 19.8 Programming/Erasing Flowchart Example in User Program Mode