- The first eight bytes (HDR through LH) are mandatory (xx
represents dummy data).
- Data bytes D1 to Dn are optional.
- Two bytes (CKL and CKH) for checksum are mandatory.
- Acknowledge done by the BSL is mandatory, except with the TX
data block and TX BSL version commands.
Table 2-1 Data Frame of BSL Commands(1)(3)(6)
Received BSL Command |
HDR |
CMD |
L1 |
L2 |
AL |
AH |
LL |
LH |
D1 |
D2…Dn |
CKL |
CKH |
ACK(2) |
RX data block |
80 |
12 |
n |
n |
AL |
AH |
n–4 |
0 |
D1 |
D2 … Dn–4 |
CKL |
CKH |
ACK |
RX password |
80 |
10 |
24 |
24 |
xx |
xx |
xx |
xx |
D1 |
D2 … D20 |
CKL |
CKH |
ACK |
Erase segment |
80 |
16 |
04 |
04 |
AL |
AH |
02 |
A5 |
– |
– – – |
CKL |
CKH |
ACK |
Erase main or info |
80 |
16 |
04 |
04 |
AL |
AH |
04 |
A5 |
– |
– – – |
CKL |
CKH |
ACK |
Mass erase |
80 |
18 |
04 |
04 |
xx |
xx |
06 |
A5 |
– |
– – – |
CKL |
CKH |
ACK |
Erase check(4) |
80 |
1C |
04 |
04 |
AL |
AH |
LL |
LH |
– |
– – – |
CKL |
CKH |
ACK |
Change baud rate(5) |
80 |
20 |
04 |
04 |
D1 |
D2 |
D3 |
xx |
– |
– – – |
CKL |
CKH |
ACK |
Set mem offset |
80 |
21 |
04 |
04 |
xx |
xx |
AL |
AH |
– |
– – – |
CKL |
CKH |
ACK |
Load PC |
80 |
1A |
04 |
04 |
AL |
AH |
xx |
xx |
– |
– – – |
CKL |
CKH |
ACK |
TX data block |
80 |
14 |
04 |
04 |
AL |
AH |
n |
0 |
– |
– – – |
CKL |
CKH |
– |
BSL responds |
80 |
xx |
n |
n |
D1 |
D2 ... |
... |
… |
... |
… Dn |
CKL |
CKH |
– |
TX BSL version(4) |
80 |
1E |
04 |
04 |
xx |
xx |
xx |
xx |
– |
– – – |
CKL |
CKH |
– |
BSL responds |
80 |
xx |
10 |
10 |
D1 |
D2 ... |
... |
… |
… |
… D10 |
CKL |
CKH |
– |
(1) All numbers are bytes in hexadecimal notation.
(2) ACK is sent back by the BSL.
(3) The synchronization sequence is not part of the data frame.
(4) The erase check and TX BSL version commands are members of the standard command set in BSLs
V1.50 or higher but excluding 2.x BSLs.
(5) The change baud rate command is not a member of the standard command set (it is available
in V1.60 or higher or in loadable BL_150S_14x.txt).
(6) Abbreviations:
HDR: Header. Any value between 80h and
8Fh (normally 80h).
CMD: Command identification
L1, L2: Number of bytes consisting of AL through Dn. Restrictions:
L1 = L2, L1 < 255, L1 even
AL, AH: Block start address or
erase (check) address or jump address LO or HI byte
LL, LH:
Number of pure data bytes (250 max) or erase information LO or HI byte or block length of erase check (FFFFh
max)
D1 … Dn: Data bytes
CKL, CKH: 16-bit checksum LO or HI byte
xx: Can be any
data
–: No character (data byte) received or transmitted
ACK: The acknowledge character returned by the BSL. Can be either DATA_ACK
= 90h: Frame was received correctly, command was executed successfully, or DATA_NAK = A0h: Frame not valid
(for example, wrong checksum, L1 ≠ L2), command is not defined, is not allowed, or was executed
unsuccessfully.
n: Number of bytes consisting of AL through Dn