Hitachi H8/3048 Hardware Manual page 592

Single-chip microcomputer
Table of Contents

Advertisement

Boot-Mode Execution Procedure: Figure 18-10 shows the boot-mode execution procedure.
www.DataSheet4U.com
Program H8/3048F pins for
1
boot mode, and resets.
Host transmits H'00 data
2
continuously at desired bit rate.
H8/3048F measures H'00 low period
for data transmitted from the host.
3
H8/3048F computes the bit rate, then
sets the value in the bit rate register.
After completing bit rate adjustment,
4
H8/3048F transmits one H'00 byte to the
host to indicate completion.
The host confirms that bit rate
5
adjustment was completed successfully,
then transmits one H'55 byte.
After receiving the H'55 byte,
6
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.
7
Does all data = H'FF? *
H8/3048F confirms that all blocks
of the flash memory are in H'FF, then
transmits one H'AA byte to the host.
8
H8/3048F receives two bytes of
the program byte number (N)
downloaded to the internal RAM. *
H8/3048F downloads user program
H8/3048F computes the length of bytes
9
downloaded (N = N-1).
Is the number of bytes
H8/3048F branches to RAM area H'F7E0,
10
and user program downloaded to
the RAM is executed.
Start
No
4
Erase all blocks of
Yes
the flash memory.
1
2
to RAM. *
No
N = 0?
Yes
Figure 18-10 Boot Mode Flowchart
583
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.

Advertisement

Table of Contents
loading

Table of Contents