Hitachi H8/3062 Hardware Manual page 507

Single-chip microcomputer
Hide thumbs Also See for H8/3062:
Table of Contents

Advertisement

Set pins to boot mode and
1
execute reset-start
Host transmits data (H'00)
2
continuously at prescribed bit rate
MCU measures low period
of H'00 data transmitted by host
3
MCU calculates bit rate and sets
value in bit rate register
After bit rate adjustment,
4
MCU transmits one H'00 data byte to
host to indicate end of adjustment
Host confirms normal reception of bit
rate adjustment end indication (H'00),
5
and transmits one H'55 data byte
After receiving H'55, MCU transmits
H'AA to host, and receives, as 2
6
bytes, number of program bytes (N)
to be transferred to on-chip RAM
MCU transfers user program
MCU calculates remaining bytes
7
to be transferred (N = N – 1)
Transfer end byte count
MCU branches to RAM boot program
area (H'FFEF20–H'FFF3FF), then
checks flash memory user area data
8
All data = H'FF?
MCU transmits H'AA, then branches
to RAM area address H'FFF400
9
and executes user program
transferred to RAM
490
Start
*1
*2
to RAM
No
N = 0?
Yes
No
Yes
Delete all flash memory
blocks
Figure 17.6 Boot Mode Execution Procedure
1. Set the MCU to boot mode and execute reset-start.
2. Set the host to the prescribed bit rate (4800/9600)
and have it transmit H'00 data continuously using a
transfer data format of 8-bit data plus 1 stop bit.
3. The MCU repeatedly measures the low period at the
RXD1 pin and calculates the asynchronous
communication bit rate used by the host.
4. After SCI bit rate adjustment is completed, the MCU
transmits one H'00 data byte to indicate the end of
adjustment.
5. On receiving the one-byte data indicating completion
of bit rate adjustment, the host should confirm
normal reception of this indication and transmit one
H'55 data byte.
6. After transmitting H'55, the host receives H'AA and
transmits the number of user program bytes to be
transferred. The number of bytes should be sent as
two bytes, upper byte followed by lower byte. The
host should then transmit sequentially the program
set by the user.
The MCU transmits the received byte count and
user program sequentially to the host, one byte at a
time, as verify data (echo-back).
7. The MCU sequentially writes the received user
program to on-chip RAM area H'FFF400–H'FFFF1F.
8. Before executing the transferred user program, the
MCU branches to the RAM boot program area
(H'FFEF20–H'FFF3FF) and checks for the presence
of data written in the flash memory. If data has been
written in the flash memory, the MCU erases all
blocks.
9. The MCU transmits H'AA, then branches to on-chip
RAM area address H'FFF400 and executes the user
program written in that area.
Notes: 1. The size of the RAM area available to the
user is 2.8k bytes. The number of bytes to
be transferred must not exceed 2.8k bytes.
The transfer byte count must be sent as two
bytes, upper byte followed by lower byte.
Example of transfer byte count: for 256
bytes (H'0100), upper byte = H'01, lower
byte = H'00
2. The part of the user program that controls
the flash memory should be set in the
program in accordance with the flash
*3
memory programming/erasing algorithm
described later in this section.
3. If a memory cell does not operate normally
and cannot be erased, the MCU will transmit
one H'FF byte as an erase error and halt the
erase operation and subsequent operations.

Advertisement

Table of Contents
loading

Table of Contents