XC886/888CLM
Bootstrap Loader
User’s Manual
18-21
V1.3, 2010-02
Bootstrap Loader, V1.0
Internally, the microcontroller will transfer the valid data (6 bytes) of the Data Block into
a buffer, and count the number of data bytes received. Microcontroller will program the
data once the maximum buffer size is reached. If an EOT Block is received before
maximum bytes are reached, then the remaining data bytes are programmed. PC host
has to transfer data in multiples of 32 (for D-Flash) or 64 (P-Flash) to ensure correct
programming.
Note: In XC886/888, flash programming needs to be performed in multiples of wordline.
For P-Flash and D-Flash, 1 wordline is 64 bytes and 32 bytes respectively. The
maximum buffer size defined is 64 bytes for P-Flash and 96 bytes for D-flash.
Note: In P-Flash programming, PC host needs to insert 2 bytes of blank data after every
64 bytes of data sent. (i.e. every 65th and 66th data byte equals zero.)
18.1.3.4
The Activation of Modes 1, 3 and 9
Mode 1 (as well as Mode9) and Mode 3 are used to execute a user program in the
XRAM/Flash of the microcontroller at 0F000H and 0000H respectively. The header block
for this mode has the following structure:
The Header Block
Mode Data Description:
Not used
: The five bytes are not used and will be ignored in Mode 1/3/9.
For Modes 1, 3 and 9, the header block is the only transfer block to be sent by the host,
no further serial communication is necessary. The microcontroller will exit the LIN BSL
and jump to the XRAM address at 0F000
H
(Mode 1 and Mode 9), and/or jump to Flash
address at 0000
H
(Mode 3).
18.1.3.5
The Activation of Mode 4
Mode 4 is used to erase sector(s) of P-Flash bank(s) or D-Flash bank(s), or mass erase
of all sectors in P-Flash and D-Flash banks. The selection of the type of erase is
controlled through the Option byte in the header block.
When
Option
= 00
H
, this mode is used to erase the P-Flash sector(s). The header block
has the following structure:
00
H
(Header Block)
Mode Data
Checksum
(1 byte)
01
H
/03
H
/09
H
(Mode 1/3/9)
Not Used (5 Bytes)
NAD
(1 byte)
*