Flash Memory Programming/Erasing - Hitachi H8S/2646 Hardware Manual

Hitachi 16-bit single-chip microcomputer h8s/2646 series
Table of Contents

Advertisement

20.7

Flash Memory Programming/Erasing

A software method, using the CPU, is employed to program and erase flash memory in the on-
board programming modes. There are four flash memory operating modes: program mode, erase
mode, program-verify mode, and erase-verify mode. Transitions to these modes for addresses
H'000000 to H'01FFFF are made by setting the PSU, ESU, P, E, PV, and EV bits in FLMCR1.
The flash memory cannot be read while being programmed or erased. Therefore, the program
(user program) that controls flash memory programming/erasing should be located and executed in
on-chip RAM or external memory.
When a program is in external memory, an instruction for writing to flash memory and the
following instruction must be in the on-chip RAM. The DTC must not be activated before or after
execution of an instruction for writing to flash memory.
In the following operation descriptions, wait times after setting or clearing individual bits in
FLMCR1 are given as parameters; for details of the wait times, see section 23.7, Flash Memory
Characteristics.
Notes: 1. Operation is not guaranteed if setting/resetting of the SWE, ESU, PSU, EV, PV, E, and
P bits in FLMCR1 is executed by a program in flash memory.
2. When programming or erasing, set FWE to 1 (programming/erasing will not be
executed if FWE = 0).
3. Programming must be executed in the erased state. Do not perform additional
programming on addresses that have already been programmed.
680

Advertisement

Table of Contents
loading

Table of Contents