Download Print this page

Programming Flowchart And Sample Program - Renesas F-ZTAT H8 Series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for F-ZTAT H8 Series:

Advertisement

Section 19 Flash Memory (H8/3048F: Dual Power Supply (V
19.5.3

Programming Flowchart and Sample Program

Flowchart for Programming One Byte
Start
n = 1
Set V
PP
(V
E bit = 1 in FLMCR)
PP
Wait (z) µs
Set erase block register
(set bit of block to be programmed to 1)
Write data to flash memory (flash
memory latches write address
and data)
Wait initial value setting x = 15 µs
Enable watchdog timer
Select program mode
(P bit = 1 in FLMCR)
Wait (x) µs
Clear P bit
Disable watchdog timer
Select program-verify mode
(PV bit = 1 in FLMCR)
Wait (t
VS1
Verify (read memory)
Clear PV bit
Clear erase block register
(clear bit of programmed block to 0)
Clear
V
PP
End (1-byte data programmed)
Rev. 7.00 Sep 21, 2005 page 606 of 878
REJ09B0259-0700
E bit
*1
*2
Programming ends
*4
) µs
No good
*3
OK
Clear erase block register
E
bit
(clear bit of block to be
Figure 19.9 Programming Flowchart
= 12 V))
PP
Notes: 1. Write the data to be programmed using a
byte transfer instruction.
2. Set the watchdog timer overflow interval
by setting CKS2 and CKS1 to 0 and
CKS0 to 1.
3. Read to verify data from the memory
using a byte transfer instruction.
4. t
: 4 µs
VS1
5 to 10 µs
z:
N:
6 (set N so that total programming
time does not exceed 1 ms)
5. Programming time x, which is determined
by the initial time × 2n
increases in proportion to n. Thus, set the
initial time to 15.8 µs or less to make total
programming time 1 ms or less.
Verify ends
Clear PV bit
No
n ≥ N?
Yes
programmed to 0)
Clear
V
E
bit
PP
Programming error
–1
(n = 1 to 6),
→ n
n + 1
Double the programming
time (x × 2 → x)
*5

Hide quick links:

Advertisement

loading