SLAA600E June 2013 – January 2024
The MSP430 BSL is the standard bootloader that is included in MSP430 MCUs. It is described in detail in the MSP430™ Flash Device Bootloader (BSL) User's Guide .
The BSL-based protocol that is implemented in MSPBoot maintains robustness, but it does not implement all of the commands and exactly the same format as the BSL protocol to reduce its footprint. The protocol is packet based and has the format in Table 2-4.
Header | Length | Payload | Checksum [L] | Checksum [H] |
---|---|---|---|---|
0x80 | 1 to PAYLOAD_MAX_SIZE(1) | 1 to PAYLOAD_MAX_SIZE Bytes | 1 Byte | 1 Byte |
Header: Fixed to 0x80
Length: 1 byte with the length of the payload. Valid values are 1 to PAYLOAD_MAX_SIZE.
Payload: One to PAYLOAD_MAX_SIZE bytes containing a command, optional address, and data (optional depending on command type).
Checksum: 16-bit CRC CCITT of the payload
The commands in Table 2-5 are implemented as a payload.
Command | CMD | Byte1 | Byte2 | Byte3 | Byte4 | … | Bytelength-1 |
---|---|---|---|---|---|---|---|
ERASE_SEGMENT | 0x12 | ADDR[L] | ADDR[M] | ADDR[H] | X | X | X |
ERASE_APP | 0x15 | X | X | X | X | X | X |
RX_DATA_BLOCK | 0x10 | ADDR[L] | ADDR[M] | ADDR[H] | DATA0 | X | DATAn |
TX_VERSION | 0x19 | X | X | X | X | X | X |
JUMP2APP | 0x1C | X | X | X | X | X | X |
ERASE_SEGMENT
Erases the memory segment (512 bytes in flash) addressed by ADDR.
ERASE_APP
Erases the application area.
RX_DATA_BLOCK
Programs n bytes of data starting at address ADDR.
TX_VERSION
Requests the MSPBoot version from the target.
JUMP2APP
Instructs the target to jump to the application image (after validation).Responses from the target are always a single byte (Table 2-6 lists the valid values).
Response | Value | Description |
---|---|---|
OK | 0x00 | Previous command executed correctly |
HEADER_ERROR | 0x51 | Frame had incorrect header |
CHECKSUM_ERROR | 0x52 | Frame checksum incorrect |
PACKETZERO_ERROR | 0x53 | Length of packet = 0 |
PACKETSIZE_ERROR | 0x54 | Length of packet > MAX_LEN |
UNKNOWN_ERROR | 0x55 | Error in Protocol |
INVALID_PARAMS | 0xC5 | Parameters received for command are incorrect |
INCORRECT_COMMAND | 0xC6 | Received Command is not valid |
MSPBOOT_VERSION | 0 to 0xFF | Sent as response for TX_VERSION command (default is 0xA0) |