English
Language : 

LM3S5662 Datasheet, PDF (792/841 Pages) Texas Instruments – Stellaris® LM3S5662 Microcontroller
Boot Loader
A.4.3
A.4.4
A.4.5
Byte[9] = Program Size [15:8]
Byte[10] = Program Size [7:0]
COMMAND_RUN (0x22)
This command is used to tell the boot loader to execute from the address passed as the parameter
in this command. This command consists of a single 32-bit value that is interpreted as the address
to execute. The 32-bit value is transmitted MSB first and the boot loader responds with an ACK
signal back to the host device before actually executing the code at the given address. This allows
the host to know that the command was received successfully and the code is now running.
Byte[0] = 7
Byte[1] = checksum(Bytes[2:6])
Byte[2] = COMMAND_RUN
Byte[3] = Execute Address[31:24]
Byte[4] = Execute Address[23:16]
Byte[5] = Execute Address[15:8]
Byte[6] = Execute Address[7:0]
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_SEND_DATA (0x24)
This command should only follow a COMMAND_DOWNLOAD command or another
COMMAND_SEND_DATA command if more data is needed. Consecutive send data commands
automatically increment address and continue programming from the previous location. For packets
which do not contain the final portion of the downloaded data, a multiple of four bytes should always
be transferred. The command terminates programming once the number of bytes indicated by the
COMMAND_DOWNLOAD command has been received. Each time this function is called it should be
followed by a COMMAND_GET_STATUS to ensure that the data was successfully programmed into
the flash. If the boot loader sends a NAK to this command, the boot loader does not increment the
current address to allow retransmission of the previous data. The following example shows a
COMMAND_SEND_DATA packet with 8 bytes of packet data:
Byte[0] = 11
Byte[1] = checksum(Bytes[2:10])
Byte[2] = COMMAND_SEND_DATA
Byte[3] = Data[0]
Byte[4] = Data[1]
Byte[5] = Data[2]
Byte[6] = Data[3]
Byte[7] = Data[4]
Byte[8] = Data[5]
792
November 17, 2011
Texas Instruments-Production Data