2 device information commands, 3 firmware upload commands, Device information commands – ScanTool STN Bootloader User Manual

Page 7: Firmware upload commands, Stn bootloader

Advertising
background image

STN

Bootloader

Connect

Start bootloader session. After successfully

receiving this command, the bootloader turns off the
startup timer, and the device will remain in bootloader
mode until it is reset (via hardware reset or a Reset
command). The bootloader will not respond to any
other command with either ‘ACK’ or ‘NACK’ unless it
receives the Connect command.

Reset

Terminate bootloader session, and reset the device.

Send Reset after successfully uploading the firmware,
to restart the device in normal mode.

ResendLast

Resend last response. This command can be used

to recover from a communication error during reception
of a bootloader response (e.g., UART framing error or
a failed CRC check).

5.2 Device Information Commands

Table 7 summarizes device information commands

supported by the current version of STN Bootloader.
These commands can be used in bootloader mode to

request information about the device. All device
information commands must have their data length
field set to 0x0000.

Table 7 – Device Information Commands

Command Name

Description

06

GetVersion

Get bootloader version

07

GetDevID

Get device ID

08

GetHWRev

Get hardware revision

0A

GetSerialNumber

Get serial number

0B

GetDeviceName

Get Device Name

0F GetFWStatus Get

firmware status (valid/invalid)

GetVersion

Get bootloader version. Returns bootloader version

in the following format (data length = 2):

<major><minor> 

GetDevID

Get device ID. Returns device ID as a big-endian

16-bit integer (data length = 2). See Appendix C:
Device IDs for the list of possible device IDs.

GetHWRev

Get device hardware revision. Returns device

hardware revision in the following format (data
length = 2):

<major><minor> 

GetSerialNumber

Get device serial number. Returns serial number as

8 ASCII characters (data length = 8).

GetDeviceName

Get device name. Returns device name as an

ASCII string. Data length is fixed at 32 bytes. For
strings shorter than 32 bytes, the remaining data bytes
will be padded with 0s.

GetFWStatus

Get firmware status. Reports whether valid

application firmware is present (data length = 1). If
valid firmware is not present, returns 0; any other value
indicates valid firmware.

Use this command to verify that the firmware was

properly programmed after upload.

5.3 Firmware Upload Commands

Table 8 summarizes firmware upload commands

supported by the current version of STN Bootloader,

which are used to upload each firmware image as
specified by the firmware file.

STNBLA www.obdsol.com 7 of 12

Advertising