Rev. 1.0, 09/01, page 788 of 904
20.9
Program/Erase Protection
There are three kinds of flash memory program/erase protection: hardware protection, software
protection, and error protection.
20.9.1
Hardware Protection
Hardware protection refers to a state in which programming/erasing of flash memory is forcibly
disabled or aborted because of a transition to reset (including an overflow reset by the WDT) or
standby mode. Flash memory control register 1 (FLMCR1), flash memory control register 2
(FLMCR2), erase block register 1 (EBR1), and erase block register 2 (EBR2) are initialized. In a
reset via the
5(6
pin, the reset state is not entered unless the
5(6
pin is held low until oscillation
stabilizes after powering on. In the case of a reset during operation, hold the
5(6
pin low for the
5(6
pulse width specified in the AC Characteristics section.
20.9.2
Software Protection
Software protection can be implemented against programming/erasing of all flash memory blocks
by clearing the SWE bit in FLMCR1 (this operation must be executed in the on-chip RAM or
external memory). When software protection is in effect, setting the P or E bit in FLMCR1 does
not cause a transition to program mode or erase mode. By setting the erase block register 1
(EBR1) and erase block register 2 (EBR2), erase protection can be set for individual blocks.
When EBR1 and EBR2 are set to H’00, erase protection is set for all blocks.
20.9.3
Error Protection
In error protection, an error is detected when the CPU’s runaway occurs during flash memory
programming/erasing, or operation is not performed in accordance with the program/erase
algorithm, and the program/erase operation is forcibly aborted. Aborting the program/erase
operation prevents damage to the flash memory due to overprogramming or overerasing.
When the following errors are detected during programming/erasing of flash memory, the FLER
bit in FLMCR2 is set to 1, and the error protection state is entered.
•
When flash memory is read during programming/erasing (including a vector read or instruction
fetch)
•
When an exception handling (excluding a reset) is started during programming/erasing
•
When a SLEEP instruction is executed during programming/erasing
•
When the CPU gives the bus to the DTC during programming/erasing
The FLMCR1, FLMCR2, EBR1, and EBR2 settings are retained, but program mode or erase
mode is forcibly aborted at the point at which the error occurred. Program mode or erase mode
cannot be re-entered by re-setting the P or E bit. However, PV and EV bit setting is enabled, and a
Summary of Contents for H8S/2376 F-ZTAT
Page 24: ...Rev 1 0 09 01 page xxiv of xliv ...
Page 38: ...Rev 1 0 09 01 page xxxviii of xliv ...
Page 44: ...Rev 1 0 09 01 page xliv of xliv ...
Page 60: ...Rev 1 0 09 01 page 16 of 904 ...
Page 96: ...Rev 1 0 09 01 page 52 of 904 ...
Page 116: ...Rev 1 0 09 01 page 72 of 904 ...
Page 148: ...Rev 1 0 09 01 page 104 of 904 ...
Page 284: ...Rev 1 0 09 01 page 240 of 904 ...
Page 422: ...Rev 1 0 09 01 page 378 of 904 ...
Page 634: ...Rev 1 0 09 01 page 590 of 904 ...
Page 656: ...Rev 1 0 09 01 page 612 of 904 ...
Page 668: ...Rev 1 0 09 01 page 624 of 904 ...
Page 780: ...Rev 1 0 09 01 page 736 of 904 ...
Page 796: ...Rev 1 0 09 01 page 752 of 904 ...
Page 806: ...Rev 1 0 09 01 page 762 of 903 ...
Page 808: ...Rev 1 0 09 01 page 764 of 904 ...
Page 921: ...Rev 1 0 09 01 page 877 of 904 ø tBRQOD tBRQOD Figure 24 24 External Bus Request Output Timing ...
Page 938: ...Rev 1 0 09 01 page 894 of 904 ...