Start
Program H8/539F pins for boot mode,
and reset
Host transmits H'00 data continuously
at desired bit rate
H8/539F measures low period
of H'00 data transmitted from host
H8/539F computes bit rate and
sets bit rate register
After completing bit-rate alignment, H8/539F
sends one H'00 data byte to host to indicate
that alignment is completed
Host checks that this byte, indicating
completion of bit-rate alignment, is received
normally, then transmits one H'55 byte
H8/539F receives two bytes indicating byte
length (N) of program to be downloaded
to on-chip RAM*1
H8/539F transfers one user program
byte to RAM*2
H8/539F calculates number of bytes left
to be transferred (N = N – 1)
All bytes transferred?
(N = 0?)
H8/539F branches to boot program area
in RAM (H'EE80 to H'F37F),
then checks user area data in flash memory
All data = H'FF?
Erase all flash
memory blocks*3
H8/539F branches to H'F380 in RAM area and
executes user program downloaded into RAM
No
Yes
Yes
No
1
2
3
4
5
6
7
8
9
515
1. Program the H8/539F pins for boot mode, and
start the H8/539F from a reset.
2. Set the host’s data format to 8 bits + 1 stop bit,
select the desired bit rate (2400, 4800, or 9600
bps), and transmit H'00 data continuously.
3. The H8/539F repeatedly measures the low period
of the RXD1 pin and calculates the host’s
asynchronous-communication bit rate.
4. When SCI bit-rate alignment is completed, the
H8/539F transmits one H'00 data byte to indicate
completion of alignment.
5. The host should receive the byte transmitted from
the H8/539F to indicate that bit-rate alignment is
completed, check that this byte is received
normally, then transmit one H'55 byte.
6. After transmitting H'55, the host transmits the byte
length of the user program to be transferred to the
H8/539F. The byte length must be sent as two-
byte data, most significant byte first and least
significant byte second. After that, the host
proceeds to transmit the user program. As
verification, the H8/539F echoes each byte of the
received byte-length data and user program back
to the host.
7. The H8/539F stores the received user program in
on-chip RAM in a 2.8-kbyte area from H'F380 to
H'FE7F.
8. Before executing the downloaded user program,
the H8/539F branches to the boot program area in
RAM (H'EE80 to H'F37F), then checks whether
the flash memory already contains any
programmed data. If so, all bocks are erased.
9. The H8/539F branches to address H'F380 in on-
chip RAM and executes the user program stored
in the area from H'F380 to H'FE7F.
Notes: 1. The user can use 2.8 kbytes of RAM. The
number of bytes transferred must not
exceed 2.8 kbytes. Be sure to transmit the
byte length in two bytes, most significant
byte first and least significant byte second.
For example, if the byte length of the
program to be transferred is 256 bytes
(H'0100), transmit H'01 as the most
significant byte, followed by H'00 as the
least significant byte.
2. The part of the user program that controls
the flash memory should be coded
according to the flash memory
program/erase algorithms given later.
3. If a memory cell malfunctions and cannot
be erased, the H8/539F transmits one H'FF
byte to report an erase error, halts erasing,
and halts further operations.
*sec.18*p497~570 30.06.1997 15:54 Uhr Page 515