Rev. 2.0, 11/00, page 197 of 1037
START
End of
programming
Programming
failure
Set SWE bit in FLMCR1
Wait (x) µs
Store 32-byte program data in program data area
and reprogram data area
n = 1
m = 0
Enable WDT
Set PSU bit in FLMCR1 or FLMCR2
Wait (y) µs
Set P bit in FLMCR1 or FLMCR2
Wait (z) µs
Start of programming
Clear P bit in FLMCR1 or FLMCR2
Wait ( ) µs
Wait ( ) µs
NO
NO
NO
NO
YES
YES
YES
Wait ( ) µs
Wait ( ) µs
*
5
*
3
*
2
*
5
*
5
*
5
*
5
*
5
*
5
*
5
*
4
*
1
*
5
Wait ( ) µs
Clear PSU bit in FLMCR1 or FLMCR2
Disable WDT
Set PV bit in FLMCR1 or FLMCR2
H'FF dummy write to verify address
Read verify data
Reprogram data computation
*
4
Transfer reprogram data to reprogram data area
Clear PV bit in FLMCR1 or FLMCR2
Clear SWE bit in FLMCR1
m = 1
End of programming
Program data = verify data?
End of 32-byte
data verification?
m = 0?
Increment address
YES
Clear SWE bit in FLMCR1
n N?
n
n+1
Notes:
Program data
0
0
1
1
Verify data
0
1
0
1
Reprogram data
1
0
1
1
Comments
Do not reprogram bits for which
programming has been completed.
Programming incomplete; reprogramming
should be performed.
—
Still in erased state; no action
1.
2.
3.
4.
5.
Write 32-byte data in RAM reprogram data
area consecutively to flash memory
Programming must be excuted in the erased state.
Do not perform additional programming on
addresses that have already been programmed.
RAM
Program data storage
area (32 bytes)
Reprogram data
storage area (32 bytes)
Data transfer is performed by byte transfer. 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.
Verify data is read in 16-bit (word) units.
Even in case of the bit which is already-programmed in the 32-byte programming loop, perform additional
programming if the bit fails at the next verify.
An area for storing program data (32 bytes) and reprogram data (32 bytes) must be provided in RAM. The contents
of the latter are rewritten as programming progresses.
The values of x, y, z, , , , , and N are listed in section 29.2.7, Flash Memory Characteristics.
Figure 8.12 Program/Program-Verify Flowchart
Summary of Contents for Hitachi H8S/2191
Page 123: ...Rev 2 0 11 00 page 96 of 1037...
Page 149: ...Rev 2 0 11 00 page 122 of 1037...
Page 197: ...Rev 2 0 11 00 page 170 of 1037...
Page 247: ...Rev 2 0 11 00 page 220 of 1037...
Page 249: ...Rev 2 0 11 00 page 222 of 1037...
Page 347: ...Rev 2 0 11 00 page 320 of 1037...
Page 357: ...Rev 2 0 11 00 page 330 of 1037...
Page 417: ...Rev 2 0 11 00 page 390 of 1037...
Page 431: ...Rev 2 0 11 00 page 404 of 1037...
Page 439: ...Rev 2 0 11 00 page 412 of 1037...
Page 457: ...Rev 2 0 11 00 page 430 of 1037...
Page 525: ...Rev 2 0 11 00 page 498 of 1037...
Page 543: ...Rev 2 0 11 00 page 516 of 1037...
Page 845: ...Rev 2 0 11 00 page 818 of 1037...