LM3S5652 Luminary Micro, Inc, LM3S5652 Datasheet - Page 663

no-image

LM3S5652

Manufacturer Part Number
LM3S5652
Description
Lm3s5652 Arm Microcontroller
Manufacturer
Luminary Micro, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
LM3S5652-IQR50-A0
Manufacturer:
Texas Instruments
Quantity:
10 000
Part Number:
LM3S5652-IQR50-A0T
Manufacturer:
Texas Instruments
Quantity:
10 000
A.3.3
A.4
A.4.1
A.4.2
A.4.3
June 02, 2008
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_GET_STATUS (0x23)
This command returns the status of the last command that was issued. Typically, this command
should be sent after every command to ensure that the previous command was successful or to
properly respond to a failure. The command requires one byte in the data of the packet and should
be followed by reading a packet with one byte of data that contains a status code. The last step is
to ACK or NAK the received data so the boot loader knows that the data has been read.
Byte[0] = 0x03
Byte[1] = checksum(Byte[2])
Byte[2] = COMMAND_GET_STATUS
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.
Preliminary
LM3S5652 Microcontroller
663

Related parts for LM3S5652