Rev. 1.0, 02/00, page 150 of 1141
7.5.3
Erase Mode (n = 1 when the target address range is H'00000 to H'3FFFF and n = 2
when the target address range is H'40000 to H'47FFF)
Flash memory erasing should be performed block by block following the procedure shown in the
erase/erase-verify flowchart (single-block erase) shown in figure 7.13.
To perform data or program erasure, make a 1 bit setting for the flash memory area to be erased in
erase block register 1 or 2 (EBR1 or EBR2) at least 1
µ
s after setting the SWEn bit to 1 in flash
memory control register n (FLMCRn). Next, the watchdog timer is set to prevent overerasing in
the event of program runaway, etc.
Set more than 19.8 ms as the WDT overflow period. After this, preparation for erase mode (erase
setup) is carried out by setting the ESUn bit in FLMCRn, and after a elapse of 100
µ
s or more, the
operating mode is switched to erase mode by setting the En bit in FLMCRn. The time during
which the En bit is set is the flash memory erase time. Ensure that erase time does not exceed 10
ms.
Note:
With flash memory erasing, preprogramming (setting all data in the memory to be erased
to 0) is not necessary before starting the erase procedure.