15.8
Protection
There are three kinds of flash memory program/erase protection: hardware protection, software
protection, and error protection.
15.8.1
Hardware Protection
Hardware protection refers to a state in which programming/erasing of flash memory is forcibly
disabled or aborted. Hardware protection is reset by settings in flash memory control register 1
(FLMCR1), erase block register 1 (EBR1), and erase block register 2 (EBR2). In the error-
protected state, the FLMCR1, FLMCR2, EBR1, and EBR2 settings are retained; the P bit and E
bit can be set, but a transition is not made to program mode or erase mode. (See table 15-11.)
Table 15-11 Hardware Protection
Item
Description
•
FWE pin
protection
•
Reset/standby
protection
•
Error protection
When a low level is input to the FWE pin,
FLMCR1, EBR1, and EBR2 are initialized,
and the program/erase-protected state is
4
entered. *
In a power-on reset (including a WDT
power-on reset) and in standby mode,
FLMCR1, FLMCR2, EBR1, and EBR2 are
initialized, and the program/erase-
protected state is entered.
In a reset via the RES pin, the reset state
is not entered unless the RES pin is held
low until oscillation stabilizes after
powering on. In the case of a reset during
operation, hold the RES pin low for the
RES pulse width specified in the AC
Characteristics section. *
•
When a microcomputer operation error
(error generation (FLER=1)) was detected
while flash memory was being
programmed/erased, error protection is
enabled. At this time, the FLMCR and EBR
settings are held, but programming/erasing
is aborted at the time the error was
generated. Error protection is released only
by a reset via the RES pin or a WDT reset,
or in the hardware standby mode.
5
Functions
Program Erase
2
3
No*
No*
3
No
No*
3
No
No*
1
Verify*
2
No*
2
No*
6
Yes*
467