English
Language : 

HD64F3437TF16 Datasheet, PDF (485/752 Pages) Hitachi Semiconductor – 12 V must not be applied to the S-mask model (single-power-supply specification), as this may permanently damage the device.
20.4 Programming and Erasing Flash Memory
The H8/3437F’s on-chip flash memory is programmed and erased by software, using the CPU.
The flash memory can operate in program mode, erase mode, program-verify mode, erase-verify
mode, or prewrite-verify mode. Transitions to these modes can be made by setting the P, E, PV,
and EV bits in the flash memory control register (FLMCR).
The flash memory cannot be read while being programmed or erased. The program that controls
the programming and erasing of the flash memory must be stored and executed in on-chip RAM or
in external memory. A description of each mode is given below, with recommended flowcharts
and sample programs for programming and erasing.
For details on programming and erasing, refer to section 20.7, Flash Memory Programming and
Erasing Precautions.
20.4.1 Program Mode
To write data into the flash memory, follow the programming algorithm shown in figure 20.8. This
programming algorithm can write data without subjecting the device to voltage stress or impairing
the reliability of programmed data.
To program data, first specify the area to be written in flash memory with erase block registers
EBR1 and EBR2, then write the data to the address to be programmed, as in writing to RAM. The
flash memory latches the address and data in an address latch and data latch. Next set the P bit in
FLMCR, selecting program mode. The programming duration is the time during which the P bit is
set. The total programming time does not exceed 1 ms. Programming for too long a time, due to
program runaway for example, can cause device damage. Before selecting program mode, set up
the watchdog timer so as to prevent overprogramming. For details of the programming method,
refer to section 20.4.3, Programming Flowchart and Sample Programs.
456