Hitachi F-ZTAT H8/3039 Series Hardware Manual page 471

Single-chip microcomputer
Table of Contents

Advertisement

Set SWE bit in FLMCR
Store 32-byte write data in write data area
and reprogram data area
Programming operation counter n ← 1
Consecutively write 32-byte data in
reprogram data area in RAM to flash memory
Set PSU bit in FLMCR
Set P bit in FLMCR
Clear P bit in FLMCR
Clear PSU bit in FLMCR
Set PV bit in FLMCR
Set verify start address
Programming end flag ← 0
H'FF dummy write to verify address
Read verify data
Programming OK?
Reprogram data computation
Transfer computation result to reprogram
Increment verify address
No
data verification completed?
Clear PV bit in FLMCR
Programming end flag = 0?
Clear SWE bit in FLMCR
End of programming
462
*1
Start
*6
Wait (x) µsec
*2
Enable WDT
*6
Wait (y) µsec
Start of programming
Wait (z) µsec
*6 *7
End of programming
Wait (α) µsec
*6
*6
Wait (β) µsec
Disable WDT
*6
Wait (γ) µsec
Wait (ε) µsec
*6
*3
NG
Programming end
flag ← 1 (unfinished)
OK
*4
*5
data area
32-byte
Yes
Wait (η) µsec
*6
No
Yes
Figure 15-11 Program/Program-Verify Flowchart
Notes: 1. Programming should be performed in the erased state.
(Perform 32-byte programming on memory after all 32 bytes
have been erased.)
2. Data transfer is performed by byte transfer (word transfer is not
possible), with the write start address at a 32-byte boundary.
The lower 8 bits of the first address written to must be H'00,
H'20, H'40, H'60, H'80, H'A0, H'C0, or H'E0. A 32-byte data
transfer must be performed even if writing fewer than 32 bytes;
in this case, H'FF data must be written to the extra addresses.
3. Verify data is read in 16-bit (word) units. (Byte-unit reading is
also possible.)
4. Reprogram data is determined by the computation shown in the
table below (comparison of data stored in the program data
area with verify data). Programming of reprogram data 0 bits is
executed in the next programming loop. Therefore, even bits for
which programming has been completed will be programmed
again if the result of the subsequent verify operation is NG.
5. An area for storing write data (32 bytes) and an area for storing
reprogram data (32 bytes) must be provided in RAM. The
contents of the latter are rewritten in accordance with the
reprogramming data computation.
6. The values of x, y, z, α, β, γ, ε, η, and N are shown in section
18.2.5, Flash Memory Characteristics.
7. The value of z depends on the number of reprogramming loops
(n). Details are given in section 18.2.5, Flash Memory
Characteristics.
Write
Verify
Data
Data
0
0
0
1
1
0
1
1
Reprogram
n ← n + 1
*6
No
n > N?
Yes
Clear SWE bit in FLMCR
Programming failure
Reprogram
Data
Comments
1
Programming completed
0
Programming incomplete; reprogram
1
1
Still in erased state; no action
RAM
Program data storage
area (32 bytes)
Reprogram data storage
area (32 bytes)

Advertisement

Table of Contents
loading

This manual is also suitable for:

F-ztat h8/3039F-ztat h8/3038F-ztat h8/3037F-ztat h8/3036

Table of Contents