English
Language : 

HD6433044 Datasheet, PDF (600/867 Pages) Hitachi Semiconductor – Hitachi Single-Chip Microcomputer
18.7.3 Programming Flowchart and Sample Program
Flowchart for Programming One Byte
Start
n=1
Set VPPE bit
(VPPE bit = 1 in FLMCR)
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)*1
Wait initial value setting x = 15 µs
Enable watchdog timer*2
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 (tVS1) µs
Verify (read memory)*3
Programming ends
No good
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. tVS1: 4 µs
z: 5 to 10 µs
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–1 (n = 1 to 6),
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.
OK
Clear PV bit
Clear erase block register
(clear bit of programmed block to 0)
Clear VPPE bit
Clear PV bit
Verify ends
No
n ≥ N?
Yes
Clear erase block register
(clear bit of block to be
programmed to 0)
n+1→n
Double the programming
time (x × 2 → x)
End (1-byte data programmed)
Clear VPPE bit
Programming error
Figure 18-15 Programming Flowchart
591