Figure 18.9 Program/Program-Verify Flowchart - Renesas H8S/2111B Hardware Manual

Bit single-chip microcomputer h8s family / h8s/2100 series
Table of Contents

Advertisement

Write pulse application subroutine
Sub-Routine Write Pulse
WDT enable
Set PSU bit in FLMCR2
Wait (γ) µs
Set P bit in FLMCR1
Wait (z1) µs, (z2) µs or (z3) µs
Clear P bit in FLMCR1
Wait (α) µs
Clear PSU bit in FLMCR2
Wait (β) µs
Disable WDT
End Sub
Note 7: Write Pulse Width
Write Time (z) µs
Number of Writes n
1
z1
2
z1
3
z1
4
z1
5
z1
6
z1
7
z2
8
z2
9
z2
10
z2
11
z2
12
z2
13
z2
998
z2
999
z2
1000
z2
Note: Use a z3 µs write pulse for additional programming.
RAM
Program data storage
area (128 bytes)
Reprogram data storage
area (128 bytes)
Additional-programming
data storage area
(128 bytes)
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 if
writing fewer than 128 bytes; in this case, H'FF data must be written to the extra addresses.
2. Verify data is read in 16-bit (word) units.
3. Even bits for which programming has been completed will be subjected to programming once again if the result of the subsequent verify operation is NG.
4. A 128-byte area for storing program data, a 128-byte area for storing reprogram data, and a 128-byte area for storing additional data must be provided in RAM.
The contents of the reprogram data area and additional data area are modified as programming proceeds.
5. A write pulse of z1 µs or z2 µs is applied according to the progress of the programming operation. See Note7 for details of the pulse widths. When writing of
additional-programming data is executed, a z3 µs write pulse should be applied. Reprogram data X' means reprogram data when the write pulse is applied.
6. The values of x, y, z1, z2, z3, α, β, γ, ε, η, θ, and N are shown in section 22.5, Flash Memory Characteristics.
Reprogram Data Computation Table
Original Data
Verify Data
Reprogram Data
(D)
(V)
(X)
0
0
1
0
1
0
1
0
1
1
1
1
Start of programming
Set SWE bit in FLMCR1
Store 128-byte program data in program
data area and reprogram data area
* 5
Write 128-byte data in RAM reprogram
data area consecutively to flash memory
Apply write pulse z1 µs or z2 µs
Set PV bit in FLMCR1
H'FF dummy write to verify address
Read verify data
Increment address
Additional-programming data computation
Transfer additional-programming data to
additional-programming data area
Reprogram data computation
Transfer reprogram data to reprogram data area
data verification completed?
NG
Clear PV bit in FLMCR1
Successively write 128-byte data from additional-
programming data area in RAM to flash memory
Apply write pulse (Additional programming)
Clear SWE bit in FLMCR1
End of programming
Comments
Programming completed
Programming incomplete;
reprogram
Still in erased state; no action

Figure 18.9 Program/Program-Verify Flowchart

START
Wait (x) µs
* 4
n = 1
m = 0
* 1
Sub-Routine-Call
See Note 7 for pulse width
Wait (γ) µs
Wait (ε) µs
* 2
Write data =
NG
verify data?
m = 1
OK
NG
6 ≥ n ?
OK
* 4
* 3
* 4
128-byte
OK
Wait (η) µs
NG
6 ≥ n?
OK
* 1
* 3
NG
m = 0 ?
OK
Wait (θ) µs
Additional-Programming Data Computation Table
Reprogram Data
Verify Data
(X')
(V)
0
0
0
1
1
0
1
1
Rev. 1.00, 05/04, page 447 of 544
Perform programming in the erased state.
Do not perform additional programming
on previously programmed addresses.
n ← n + 1
µs
NG
n ≥ (N)?
OK
Clear SWE bit in FLMCR1
Wait (θ) µs
Programming failure
Additional-
Programming Data (Y)
Comments
Additional programming
0
to be executed
1
Additional programming
not to be executed
1
Additional programming
1
not to be executed

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hd64f2111b

Table of Contents