Section 24 ROM
Rev. 3.00 Jan 25, 2006 page 734 of 872
REJ09B0286-0300
START
End of programming
Set SWE bit in FLMCR1
Start of programming
Write pulse application subroutine
Wait (x)
µ
s
Sub-Routine Write Pulse
End Sub
Set PSU bit in FLMCR2
WDT enable
Disable WDT
Number of Writes n
1
2
3
4
5
6
7
8
9
10
11
12
13
998
999
1000
Note 7: Write Pulse Width
Write Time (z)
µ
s
z1
z1
z1
z1
z1
z1
z2
z2
z2
z2
z2
z2
z2
z2
z2
z2
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
n = 1
m = 0
NG
NG
NG
NG
NG
OK
OK
OK
Wait (
γ
)
µ
s
Wait (
ε
)
µ
s
*
2
*
4
*
6
*
6
*
6
*
6
*
6
*
6
*
6
*
6
*
5
*
6
*
1
Wait (
η
)
µ
s
Apply write pulse z1
µ
s or z2
µ
s
Sub-Routine-Call
Set PV bit in FLMCR1
H'FF dummy write to verify address
Read verify data
Write data =
verify data?
*
4
*
6
*
6
*
6
*
6
*
3
*
3
*
1
Transfer reprogram data to reprogram data area
Reprogram data computation
*
4
Transfer additional-programming data to
additional-programming data area
Additional-programming data computation
Clear PV bit in FLMCR1
Clear SWE bit in FLMCR1
m = 1
See Note 7 for pulse width
m = 0 ?
Increment address
Programming failure
OK
Clear SWE bit in FLMCR1
Wait (
θ
)
µ
s
µ
s
OK
6
≥
n?
NG
OK
6
≥
n ?
Wait (
θ
)
µ
s
n
≥
(N)?
n
←
n + 1
Original Data
(D)
Verify Data
(V)
Reprogram Data
(X)
Comments
Programming completed
Programming incomplete; reprogram
Still in erased state; no action
Note: Use a z3
µ
s write pulse for additional programming.
Write 128-byte data in RAM reprogram
data area consecutively to flash memory
RAM
Program data storage
area (128 bytes)
Reprogram data storage
area (128 bytes)
Additional-programming
data storage area
(128 bytes)
Store 128-byte program data in program
data area and reprogram data area
Apply write pulse (Additional programming) z3
µ
s
128-byte
data verification completed?
Successively write 128-byte data from additional-
programming data area in RAM to flash memory
Reprogram Data Computation Table
1
0
1
1
0
1
0
1
0
0
1
1
Reprogram Data
(X')
Verify Data
(V)
Additional-
Programming Data (Y)
Comments
Additional programming to be executed
Additional programming not to be executed
Additional programming not to be executed
Additional-Programming Data Computation Table
0
1
1
1
0
1
0
1
0
0
1
1
Perform programming in the erased state.
Do not perform additional programming
on previously programmed addresses.
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 29.6, Flash Memory Characteristics.
Figure 24.9 Program/Program-Verify Flowchart
Содержание H8S/2158
Страница 10: ...Rev 3 00 Jan 25 2006 page viii of lii...
Страница 36: ...Rev 3 00 Jan 25 2006 page xxxiv of lii B Product Lineup 863 C Package Dimensions 864 Index 865...
Страница 47: ...Rev 3 00 Jan 25 2006 page xlv of lii Appendix Figure C 1 Package Dimensions TBP 112A 864...
Страница 54: ...Rev 3 00 Jan 25 2006 page lii of lii...
Страница 70: ...Section 1 Overview Rev 3 00 Jan 25 2006 page 16 of 872 REJ09B0286 0300...
Страница 118: ...Section 3 MCU Operating Modes Rev 3 00 Jan 25 2006 page 64 of 872 REJ09B0286 0300...
Страница 126: ...Section 4 Exception Handling Rev 3 00 Jan 25 2006 page 72 of 872 REJ09B0286 0300...
Страница 198: ...Section 6 Bus Controller Rev 3 00 Jan 25 2006 page 144 of 872 REJ09B0286 0300...
Страница 326: ...Section 10 8 Bit PWM Timer PWM Rev 3 00 Jan 25 2006 page 272 of 872 REJ09B0286 0300...
Страница 440: ...Section 15 Watchdog Timer WDT Rev 3 00 Jan 25 2006 page 386 of 872 REJ09B0286 0300...
Страница 606: ...Section 17 I 2 C Bus Interface IIC Rev 3 00 Jan 25 2006 page 552 of 872 REJ09B0286 0300...
Страница 742: ...Section 19 Multimedia Card Interface MCIF Rev 3 00 Jan 25 2006 page 688 of 872 REJ09B0286 0300...
Страница 744: ...Section 20 Encryption Operation Circuit DES and GF Rev 3 00 Jan 25 2006 page 690 of 872 REJ09B0286 0300...
Страница 750: ...Section 21 D A Converter Rev 3 00 Jan 25 2006 page 696 of 872 REJ09B0286 0300...
Страница 768: ...Section 22 A D Converter Rev 3 00 Jan 25 2006 page 714 of 872 REJ09B0286 0300...
Страница 770: ...Section 23 RAM Rev 3 00 Jan 25 2006 page 716 of 872 REJ09B0286 0300...
Страница 824: ...Section 26 Clock Pulse Generator Rev 3 00 Jan 25 2006 page 770 of 872 REJ09B0286 0300...
Страница 844: ...Section 27 Power Down Modes Rev 3 00 Jan 25 2006 page 790 of 872 REJ09B0286 0300...
Страница 878: ...Section 28 List of Registers Rev 3 00 Jan 25 2006 page 824 of 872 REJ09B0286 0300...
Страница 926: ...Index Rev 3 00 Jan 25 2006 page 872 of 872 REJ09B0286 0300...