Boot-Mode Execution Procedure:
Figure 18-10 shows the boot-mode execution procedure.
Figure 18-10 Boot Mode Flowchart
Start
3
4
5
6
7
8
9
10
1
2
Program H8/3048F pins for
boot mode, and resets.
After completing bit rate adjustment,
H8/3048F transmits one H'00 byte to the
host to indicate completion.
Host transmits H'00 data
continuously at desired bit rate.
The host confirms that bit rate
adjustment was completed successfully,
then transmits one H'55 byte.
After receiving the H'55 byte,
H8/3048F branches to boot program
area in RAM.
H8/3048F branches to RAM boot area
H'FFF300 to H'FFFEFF, then checks
the flash memory user area data.
H8/3048F confirms that all blocks
of the flash memory are in H'FF, then
transmits one H'AA byte to the host.
H8/3048F receives two bytes of
the program byte number (N)
downloaded to the internal RAM.
*
1
H8/3048F downloads user program
to RAM.
*
2
No
Yes
H8/3048F computes the length of bytes
downloaded (N = N-1).
H8/3048F branches to RAM area H'F7E0,
and user program downloaded to
the RAM is executed.
Erase all blocks of
the flash memory.
Does all data = H'FF
*
4
No
Yes
H8/3048F measures H'00 low period
for data transmitted from the host.
H8/3048F computes the bit rate, then
sets the value in the bit rate register.
Is the number of bytes
N = 0
1. Program the H8/3048F pins for boot mode, and start the
H8/3048F 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), and transmit H'00
data continuously.
3. H8/3048F measures the duration of repeat when the RDX
pin is "Low," then computes the bit rate of the serial
transmission from the host.
4. After H8/3048F completes SCI bit rate adjustment, one byte
of H'00 data is transmitted to indicate completion.
5. On receiving one byte from H8/3048F to indicate
completion of bit rate adjustment, the host confirms regular
reception then transmits one byte of H'55. H8/3048F
transmits H'AA to indicate regular reception.
6. After H8/3048F receives H'55, it branches to boot program
area H'FFF300 to H'FFFEFF.
7. When H8/3048F branches to boot program area H'FFF300
to H'FFFEFF, it confirms that data written to the flash
memory is saved. If data is already written, all blocks are
erased.
8. H8/3048F transmits one byte of H'AA. Then the host
transmits the byte length of the user program downloaded
to H8/3048F. The byte length must be sent as two-byte
data, most significant byte first and least significant byte
second. Then user-specified programs should be
transmitted in order. The byte length received by H8/3048F
or the user program is verified, and one byte each is
transmitted in order to the host (echo back).
9. H8/3048F writes the received user program to area
H'FFF300 to H'FFFEFF on the internal RAM.
10. H8/3048F branches to the internal RAM FFF300, and the
written user program is executed.
Notes: 1. The user can use 3072 bytes of RAM. The number of
bytes transferred must not exceed 3072 bytes. 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/3048F transmits one H'FF byte to report an
erase error, halts erasing, and halts further
operations.
4. The allotted boot program area is H'FFF300 to
H'FFFEFF.
583