681
Start
End of programming
End sub
Set SWE bit in FLMCR1
Wait (x)
μ
s
n = 1
m = 0
Sub-routine-call
See Note 7 for pulse width
Note 7: Write Pulse Width
Number of Writes n
1
2
3
4
5
6
7
8
9
10
11
12
13
.
998
999
1000
Note: programming.
μ
s write pulse for additional
Start of programming
Sub-routine write pulse
Set PSU bit in FLMCR2
Enable WDT
Set P bit in FLMCR1
Wait (y)
μ
s
Clear P bit in FLMCR1
Wait (z1)
μ
s, (z2)
μ
s or (z3)
μ
s
Clear PSU bit in FLMCR2
Wait (
α
)
μ
s
Disable WDT
Wait (
β
)
μ
s
Write pulse application subroutine
NG
NG
NG
NG
OK
OK
Wait (
γ
)
μ
s
Wait (
ε
)
μ
s
*
2
*
4
*
5
*
1
Wait (
η
)
μ
s
Set PV bit in FLMCR1
H'FF dummy write to verify address
Read verify data
Pverify data
to additional program data area
Additional program data computation
Clear PV bit in FLMCR1
Clear SWE bit in FLMCR1
m = 1
End of 128-byte
m = 0
Increment address
Programming failure
OK
Original Data (D)
0
1
Verify Data (V)
0
1
0
1
Comments
Writarea consecutively to flash memory
Write pulse
(z1)
s or (z2)
μ
s
RAM
Program data storage
area (128 bytes)
Re area (128 bytes)
Store 128-byte program data in program
data area and reprogram data area
Write Time (z)
μ
s
z1
z1
z1
z1
z1
z1
z2
z2
z2
z2
z2
z2
z2
z2
z2
z2
Reprogram data computation
Transfer reprogram data to reprogram data area
*
4
*
3
6
≥
n
NG
OK
area in RAM consecutively to flash memory
Additional write pulse (z3)
μ
s
Wait (
θ
)
μ
s
*
1
Program Data Computation Chart
Additional program data
storage area (128 bytes)
OK
OK
NG
Perform programming in the erased state.
Do not perform additional programming
on previously programmed addresses.
*
4
n
←
n + 1
n
≥
1000
Clear SWE bit in FLMCR1
Wait (
θ
)
μ
s
6
≥
n
Notes: 1. Data transfer is performed by byte transfer. The lower 8 bits of the first address written to must be H'00 or H'80. A 128-byte data transfer must be performed even
2. if writing fewer than 128 bytes; in this case, H'FF data must be written to the extra addresses.
4. RAM. The reprogram and additional program data contents are modified as programming proceeds.
5. program data is executed, a (z3)
μ
s or (z2)
μ
6. See section 25, Electrical Characts is applied according to the progress of the programming operation. See Note 7 for the pulse widths. When writing of additional
α
,
β
,
γ
,
ε
,
η
,
θ
, and N.
Programming completed
Programming incomplete; reprogram
Still in erased state; no action
Reprogram Data (X')
0
1
Verify Data (V)
0
1
0
1
Additional Program Data (Y)
0
1
1
1
Comments
Additional Program Data Computation Chart
Additional programming executed
Additional programming not executed
Additional programming not executed
Reprogram Data (X)
1
0
1
1
Figure 22.12 Program/Program-Verify Flowchart