English
Language : 

LM3S2776 Datasheet, PDF (736/785 Pages) Texas Instruments – Stellaris® LM3S2776 Microcontroller
Boot Loader
A.3.3
A.4
A.4.1
A.4.2
the device indicating the packet was received successfully (ACK) or unsuccessfully (NAK). This
does not indicate that the actual contents of the command issued in the data portion of the packet
were valid, just that the packet was received correctly.
Receiving Packets
The boot loader sends a packet of data in the same format that it receives a packet. The boot loader
may transfer leading zero data before the first actual byte of data is sent out. The first non-zero byte
is the size of the packet followed by a checksum byte, and finally followed by the data itself. There
is no break in the data after the first non-zero byte is sent from the boot loader. Once the device
communicating with the boot loader receives all the bytes, it must either ACK or NAK the packet to
indicate that the transmission was successful. The appropriate response after sending a NAK to
the boot loader is to resend the command that failed and request the data again. If needed, the host
may send leading zeros before sending down the ACK/NAK signal to the boot loader, as the boot
loader only accepts the first non-zero data as a valid response. This zero padding is needed by the
SSI interface in order to receive data to or from the boot loader.
Commands
The next section defines the list of commands that can be sent to the boot loader. The first byte of
the data should always be one of the defined commands, followed by data or parameters as
determined by the command that is sent.
COMMAND_PING (0X20)
This command simply accepts the command and sets the global status to success. The format of
the packet is as follows:
Byte[0] = 0x03;
Byte[1] = checksum(Byte[2]);
Byte[2] = COMMAND_PING;
The ping command has 3 bytes and the value for COMMAND_PING is 0x20 and the checksum of one
byte is that same byte, making Byte[1] also 0x20. Since the ping command has no real return status,
the receipt of an ACK can be interpreted as a successful ping to the boot loader.
COMMAND_DOWNLOAD (0x21)
This command is sent to the boot loader to indicate where to store data and how many bytes will
be sent by the COMMAND_SEND_DATA commands that follow. The command consists of two 32-bit
values that are both transferred MSB first. The first 32-bit value is the address to start programming
data into, while the second is the 32-bit size of the data that will be sent. This command also triggers
an erase of the full area to be programmed so this command takes longer than other commands.
This results in a longer time to receive the ACK/NAK back from the board. This command should
be followed by a COMMAND_GET_STATUS to ensure that the Program Address and Program size
are valid for the device running the boot loader.
The format of the packet to send this command is a follows:
Byte[0] = 11
Byte[1] = checksum(Bytes[2:10])
Byte[2] = COMMAND_DOWNLOAD
Byte[3] = Program Address [31:24]
Byte[4] = Program Address [23:16]
Byte[5] = Program Address [15:8]
736
November 17, 2011
Texas Instruments-Production Data