Datasheet
Section 23 ROM
Rev. 3.00 Mar 21, 2006 page 623 of 788
REJ09B0300-0300
Ye s
No
Program/erase?
Reset-start
Branch to flash memory
application program
Transfer user program/
erase control program to RAM
Branch to flash memory
application program
Branch to user program/
erase control program in RAM
Execute user program/erase control
program (flash memory rewrite)
Figure 23.10 Programming/Erasing Flowchart Example in User Program Mode
23.8 Flash Memory Programming/Erasing
A software method, using the CPU, is employed to program and erase flash memory in the on-
board programming modes. Depending on the FLMCR1 and FLMCR2 settings, the flash memory
operates in one of the following four modes: program mode, program-verify mode, erase mode,
and erase-verify mode. The programming control program in boot mode and the user
program/erase control program in user program mode use these operating modes in combination to
perform programming/erasing. Flash memory programming and erasing should be performed in
accordance with the descriptions in section 23.8.1, Program/Program-Verify and section 23.8.2,
Erase/Erase-Verify, respectively.