SLAA721E October 2016 – March 2020 MSP430FR5969 , MSP430FR5969-SP , MSP430FR5994 , MSP430FR6989
The MSP430 BSL is the standard bootloader included in MSP430 MCUs. The BSL is described in detail in MSP430 FRAM Devices Bootloader (BSL) User's Guide.
The BSL-based protocol implemented in MSP430FRBoot maintains robustness but does not implement all the commands and exactly the same format as the BSL protocol to reduce its footprint. The protocol is packet-based and has the format shown 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: 1 to PAYLOAD_MAX_SIZE bytes containing the command, address, and data (optional depending on the 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 (512B in FRAM) 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).
Each response from the target is 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) |