Programming Flowchart And Sample Program - Renesas H8 Series Hardware Manual

8-bit single-chip microcomputer
Hide thumbs Also See for H8 Series:
Table of Contents

Advertisement

6.7.3

Programming Flowchart and Sample Program

Flowchart for Programming One Byte
Start
Set erase block register
(set bit for block to be programmed to 1)
Write data to flash memory
(flash memory latches write address
and data)
n = 1
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)
) µs
Wait (t
vs1
Verify
*3
(read memory)
OK
Clear PV bit
Clear erase block register
(clear bit for programmed block to 0)
End (1-byte data programmed)
*1
*2
*4
End of programming
*5
NG
Figure 6.13 Programming Flowchart
Notes: 1. Write the data to be programmed using a byte
transfer instruction.
2. For the timer overflow interval, set the timer
counter value (TCW) to H'FE.
3. Read the memory data to be verified using a
byte transfer instruction.
4. Programming time x is successively
incremented to initial set value × 2
6). The initial value should therefore be set to
15.8 µs or less to make the total
programming time 1 ms or less.
5. t
: 4 µs or more
vs1
N:
6 (set N so that total programming time
does not exceed 1 ms)
End of verify
Clear PV bit
No
n ≥ N?
*5
Yes
Programming error
Rev. 6.00 Sep 12, 2006 page 129 of 526
Section 6 ROM
n–1
(n = 1 to
n + 1 → n
Double the programming time
(x × 2 → x)
REJ09B0326-0600

Advertisement

Table of Contents
loading

Table of Contents