Erase/Erase-Verify; Interrupt Handling When Programming/Erasing Flash Memory - Hitachi H8S/2628 Hardware Manual

H8s/2628 series 16-bit single-chip microcomputer
Table of Contents

Advertisement

19.8.2

Erase/Erase-Verify

When erasing flash memory, the erase/erase-verify flowchart shown in figure 19.10 should be
followed.
1. Prewriting (setting erase block data to all 0s) is not necessary.
2. Erasing is performed in block units. Specify a single block o be erased with the erase block
registers (EBR1 and EBR2). To erase multiple blocks, each block must be erased in turn.
3. The time during which the E bit is set to 1 is the flash memory erase time.
4. The watchdog timer (WDT) is set to prevent overerasing due to program runaway, etc. Set the
overflow cycle to approximately 19.8 ms.
5. For a dummy write to a verify address, write 1-byte data H'FF to an address whose lower two
bits are B'00. Verify data can be read in longwords from the address to which a dummy write
was performed.
6. If the read data is not erased successfully, set erase mode again, and repeat the erase/erase-
verify sequence as before. Note that the number of repetitions of the erase/erase-verify
sequence should be less than 100.
19.8.3

Interrupt Handling when Programming/Erasing Flash Memory

All interrupts, including the NMI interrupt, should be disabled while flash memory is being
programmed, erased, or the boot program is being executed, for the following three reasons:
1. Interrupt during programming/erasing may cause a violation of the programming or erasing
algorithm, with the result that normal operation cannot be assured.
2. If interrupt exception handling starts before the vector address is written or during
programming/erasing, a correct vector cannot be fetched and the CPU malfunctions.
3. If an interrupt occurs during boot program execution, normal boot mode sequence cannot be
carried out.
Rev. 1.0, 09/02, page 463 of 568

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hd64f2628Hd6432628H8s/2627Hd6432627

Table of Contents