beautypg.com

2 command validation errors, 3 firmware upload errors, 0 bootloader commands – ScanTool STN Bootloader User Manual

Page 6: 1 control commands, Bootloader commands, Control commands, Ction 5.0 “bootloader commands, Stn bootloader

background image

STN Bootloader

CRC

The bootloader responds with this error when the

received packet fails the CRC check. To recover from
this error, resend the packet.

Packet Too Long

Whenever the size of the bootloader’s internal

buffer is exceeded, it will stop receiving the command
and wait for the character; after it receives the
, the bootloader will respond with the Packet
Too Long error.

When properly formatted, none of the commands

with fixed data length will generate this error. However,
the SendChunk command accepts a variable data
length parameter, and may generate this error if the
data length exceeds the maximum chunk size
supported by the bootloader. See StartUpload
command description for more information.

4.6.2.2 Command Validation Errors

After the bootloader receives a packet and verifies

the CRC, it proceeds to validate the command. The
following two errors may be generated for any
command received by the bootloader:

Unknown Command

field of a packet received by the

bootloader does not match any of the supported
commands.

Command Format

This error will be generated by an incorrect

formatting of the field. This can happen if the
data length is incorrect, or the data values are outside
of the supported range.

4.6.2.3 Firmware Upload Errors

Firmware upload errors can occur at any point

during the firmware upload sequence. The two
commands that can generate these errors are
StartUpload and SendChunk.

Sequence

This error is returned when a firmware upload

sequence error is detected. Conditions that can cause
this error are:

SendChunk command received before

StartUpload command

• Chunk number is out of sequence

• The number of bytes received by the bootloader

exceeds the number specified by the
field of the StartUpload command

Authentication

This error will be returned if the host software

attempts to upload a firmware image for the wrong
device. It can also be caused by a corrupted firmware
image.

If an attempt is made to upload an invalid firmware

image, most of the time this will be detected within the
first few packets and the old firmware will remain intact.

Programming

This error will be returned if the bootloader

encounters any errors while attempting to program the
uploaded firmware. To attempt a recovery, reset the
device and try uploading the firmware again.

Validation

This error is similar to the Programming error.

However, it has a special meaning for firmware images
of the Validation type. See section 6.0 Firmware
Update Procedure
” for more information.

5.0 Bootloader

Commands

5.1 Control Commands

Control commands are used for establishing and

terminating the bootloader session and to aid in error
recovery. All control commands have their data length

field set to 0x0000. Table 6 summarizes control
commands supported by the current version of STN
Bootloader.

Table 6 – Control Commands

Command Name

Description

03

Connect

Start bootloader session

02 Reset

Reset

device

01

ResendLast

Resend last response

6 of 12

www.obdsol.com STNBLA