Download Print this page

Hitachi H8S/2633 Hardware Manual page 826

Advertisement

22.7.3
Erase Mode
When erasing flash memory, the single-block erase/erase-verify flowchart shown in figure 22-12
should be followed.
To erase flash memory contents, make a 1-bit setting for the flash memory area to be erased in
erase block register 1 and 2 (EBR1, EBR2) at least (x) µs after setting the SWE1 bit to 1 in
FLMCR1. Next, the watchdog timer (WDT) is set to prevent overerasing due to program
runaway, etc. Set 6.6 ms as the WDT overflow period. Preparation for entering erase mode (erase
setup) is performed next by setting the ESU1 bit in FLMCR1. The operating mode is then
switched to erase mode by setting the E1 bit in FLMCR1 after the elapse of at least (y) µs. The
time during which the E1 bit is set is the flash memory erase time. Ensure that the erase time does
not exceed (z) ms.
Note: With flash memory erasing, preprogramming (setting all memory data in the memory to
be erased to all 0) is not necessary before starting the erase procedure.
22.7.4
Erase-Verify Mode
In erase-verify mode, data is read after memory has been erased to check whether it has been
correctly erased.
After the elapse of the fixed erase time, clear the E1 bit in FLMCR1, then wait for at least (α) µs
before clearing the ESU1 bit to exit erase mode. After exiting erase mode, the watchdog timer is
cleared after the elapse of (β) µs or more. The operating mode is then switched to erase-verify
mode by setting the EV1 bit in FLMCR1. Before reading in erase-verify mode, a dummy write of
H'FF data should be made to the addresses to be read. The dummy write should be executed after
the elapse of (γ) µs or more. When the flash memory is read in this state (verify data is read in 16-
bit units), the data at the latched address is read. Wait at least (ε) µs after the dummy write before
performing this read operation. If the read data has been erased (all 1), a dummy write is
performed to the next address, and erase-verify is performed. If the read data is unerased, set erase
mode again and repeat the erase/erase-verify sequence in the same way. The maximum number of
reoperations of the erase/erase-verify sequence is indicated by the maximum erase count (N).
However, ensure that the erase/erase-verify sequence is not repeated more than (N) times. When
verification is completed, exit erase-verify mode, and wait for at least (η) µs. If erasure has been
completed on all the erase blocks, clear the SWE1 bit in FLMCR1. If there are any unerased
blocks, make a 1 bit setting for the flash memory area to be erased, and repeat the erase/erase-
verify sequence as before.
811

Advertisement

loading

This manual is also suitable for:

Hd6432633Hd6432631Hd64f2633H8s/2632Hd6432632H8s/2631