SLAA721E October   2016  – March 2020 MSP430FR5969 , MSP430FR5969-SP , MSP430FR5994 , MSP430FR6989

 

  1.   Trademarks
  2. 1Introduction
    1. 1.1 Glossary
    2. 1.2 Conventions
  3. 2Implementation
    1. 2.1 Main
    2. 2.2 Application Manager
      1. 2.2.1 Bootloader and Application Detection
        1. 2.2.1.1 Forcing Bootloader Mode
        2. 2.2.1.2 Application Validation
        3. 2.2.1.3 Jumping to Application
      2. 2.2.2 Memory Assignment
      3. 2.2.3 Interrupt Vectors in FRAM Devices
    3. 2.3 Memory Interface (MI)
      1. 2.3.1 Dual Image Support
    4. 2.4 Communication Interface (CI)
      1. 2.4.1 Physical-DataLink (PHY-DL)
        1. 2.4.1.1 UART
        2. 2.4.1.2 SPI
        3. 2.4.1.3 CC110x
        4. 2.4.1.4 Comm Sharing
      2. 2.4.2 NWK-APP
        1. 2.4.2.1 BSL-Based Protocol
          1. 2.4.2.1.1 Security
          2. 2.4.2.1.2 BSL-Based Protocol Using CC110x
          3. 2.4.2.1.3 Examples Using UART or CC110x
  4. 3Customization of MSP430FRBoot
    1. 3.1 Predefined Customizations
  5. 4Building MSPBoot
    1. 4.1 LaunchPad™ Development Kit Hardware
    2. 4.2 CC110x Hardware
    3. 4.3 Software
      1. 4.3.1 Building the Target Software
      2. 4.3.2 Convert Application Output Images
      3. 4.3.3 Generating Linker Files
  6. 5Demo Using FRAM LaunchPad Development Kit as Host
    1. 5.1 Hardware
    2. 5.2 Building the Host Project
    3. 5.3 Running the Demo
  7. 6Porting the target side example projects to other MSP430FR devices
  8. 7References
  9. 8Revision History

BSL-Based Protocol

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.

Table 2-4 BSL-Based Protocol Command Format
Header Length Payload Checksum[L] Checksum[H]
0x80 1 to PAYLOAD_MAX_SIZE(1) 1 to PAYLOAD_MAX_SIZE bytes 1 byte 1 byte
PAYLOAD_MAX_SIZE is set to 20 by default (1 CMD + 3 Addr + 16 Data).

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.

Table 2-5 BSL-Based Protocol Commands
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.

Table 2-6 BSL-Based Protocol Slave Response
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)