576
Notes: 1. : user mode, : on-board programming mode
2. Do not make transitions by setting or clearing multiple bits simultaneously.
3. After changing from erase mode to erase setup status, do not change back to erase mode except
via software overwrite enable status.
4. After changing from program mode to program setup status, do not change back to program mode
except via software overwrite enable status.
On-board
programming mode
Software overwrite disabled
status
Software
overwrite enabled
status
Erase setup
status
Erase verify
mode
Program setup
status
Program verify
mode
Erase mode
Program
mode
PSU = 1
PSU = 0
PV = 1
PV = 0
EV = 0
EV = 1
ESU = 0
ESU = 1
E = 1
E = 0
P = 1
P = 0
SWE = 1
SWE = 0
FWE = 0
FWE = 1
*
1
*
2
*
3
*
4
User mode
Figure 17.20 Mode Transitions Using Settings of Bits in FLMCR1 and FLMCR2
17.9.1
Program Mode
Follow the procedure shown in the program/program-verify flowchart in figure 17.21 to write data
or programs to flash memory. Performing program operations according to this flowchart will
enable data or programs to be written to flash memory without subjecting the device to voltage
stress or sacrificing program data reliability. Programming should be carried out 32 bytes at a
time.
The wait times (x, y, z,
α
, ,
γ, ε, η)
after bits are set or cleared in flash memory control registers 1
and 2 (FLMCR1, FLMCR2) and the maximum number of programming operations (N) are shown
in table 22.10 in section 20.1.6, Flash Memory Characteristics.
Following the elapse of (x)
μ
s or more after the SWE bit is set to 1 in FLMCR1, 32-byte program
data is stored in the program data area and reprogram data area, and the 32-byte data in the