English
Language : 

D12320VF25IV Datasheet, PDF (910/1304 Pages) Renesas Technology Corp – Old Company Name in Catalogs and Other Documents
Section 19 ROM
19.25 Programming/Erasing Flash Memory
In the on-board programming modes, flash memory programming and erasing is performed by
software, using the CPU. There are four flash memory operating modes: program mode, erase
mode, program-verify mode, and erase-verify mode. Transition to these modes can be made for
addresses H'000000 to H'03FFFF by setting the PSU1, ESU1, P1, E1, PV1, and EV1 bits in
FLMCR1, and for addresses H'040000 to H'07FFFF by setting the PSU2, ESU2, P2, E2, PV2, and
EV2 bits in FLMCR2.
The flash memory cannot be read while being programmed or erased. Therefore, the program that
controls flash memory programming/erasing (the programming control program) should be
located and executed in on-chip RAM, external memory, or flash memory except for the above
address areas. When the program is located in external memory, an instruction for programming
the flash memory and the following instruction should be located in on-chip RAM. The DMAC or
DTC should not be activated before or after the instruction for programming the flash memory is
executed.
Notes: 1. Operation is not guaranteed if setting/resetting of the SWE1, ESU1, PSU1, EV1, PV1,
E1, and P1 bits in FLMCR1 or setting/resetting of the SWE2, ESU2, PSU2, EV2, PV2,
E2, and P2 bits in FLMCR2 is executed by a program in flash memory.
2. When programming or erasing, set FWE to 1 (programming/erasing is not performed
when FWE = 0).
3. Perform programming in the erased state. Do not perform additional programming on
previously programmed addresses.
4. Do not program addresses H'000000 to H'03FFFF and H'040000 to H'07FFFF
simultaneously. Operation is not guaranteed when programming is performed
simultaneously.
19.25.1 Program Mode (n = 1 for addresses H'000000 to H'03FFFF and n = 2 for addresses
H'040000 to H'07FFFF)
Follow the procedure shown in the program/program-verify flowchart in figure 19.70 to write data
or programs to flash memory. Performing program operations according to this flowchart will
enable data or programs to be written to flash memory without subjecting the device to voltage
stress or sacrificing program data reliability. Programming should be carried out 128 bytes at a
time.
For the wait times (x, y, z1, z2, z3 α, ß, γ, ε, η, and θ) after bits are set or cleared in flash memory
control register n (FLMCRn) and the maximum number of programming operations (N), see
section 22.2.6, Flash Memory Characteristics.
Rev.6.00 Sep. 27, 2007 Page 878 of 1268
REJ09B0220-0600