SLAA600E June   2013  – January 2024

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 Glossary
    2. 1.2 Conventions
  5. 2Implementation
    1. 2.1 Main
    2. 2.2 Application Manager
      1. 2.2.1 Boot and Application Detection
        1. 2.2.1.1 Force Bootloader Mode
        2. 2.2.1.2 Application Validation
        3. 2.2.1.3 Jump to Application
      2. 2.2.2 Vector Redirection
      3. 2.2.3 Interrupt Vectors in Flash Devices
      4. 2.2.4 Dual Image Support
        1. 2.2.4.1 Jumping to Application in Dual Image Mode
    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 I2C
          1. 2.4.1.1.1 Time-out Detection
        2. 2.4.1.2 UART
        3. 2.4.1.3 SPI
        4. 2.4.1.4 CC110x
        5. 2.4.1.5 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 I2C
          4. 2.4.2.1.4 Examples Using UART or CC110x
  6. 3Customization of MSPBoot
    1. 3.1 Predefined Customizations
  7. 4Building MSPBoot
    1. 4.1 Starting a New Project
      1. 4.1.1 Creating a New MSPBoot Project
        1. 4.1.1.1 MSPBootProjectCreator.pl
        2. 4.1.1.2 Importing Project Spec File in CCS
        3. 4.1.1.3 Modifying Generated Source Code
          1. 4.1.1.3.1 Modifying MSPBoot Main.c
          2. 4.1.1.3.2 Modifying TI_MSPBoot_Config.h
          3. 4.1.1.3.3 Modifying TI_MSPBoot_CI_PHYDL_xxxx_xxx.c
          4. 4.1.1.3.4 Modifying TI_MSPBoot_AppMgr.c
          5. 4.1.1.3.5 Modifying Application Main.c
          6. 4.1.1.3.6 Modifying TI_MSPBoot_Mgr_Vectors_xxxx.c
      2. 4.1.2 Loading Application Code With MSPBoot
        1. 4.1.2.1 Convert Application Output Images
    2. 4.2 Examples
      1. 4.2.1 LaunchPad Development Kit Hardware
      2. 4.2.2 CC110x Hardware
      3. 4.2.3 Building the Target Project
      4. 4.2.4 Building the Host Project
      5. 4.2.5 Running the Examples
  8. 5References
  9. 6Revision History

BSL-Based Protocol

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.

Table 2-4 BSL-Based Protocol Command Format
HeaderLengthPayloadChecksum [L]Checksum [H]
0x801 to PAYLOAD_MAX_SIZE(1)1 to PAYLOAD_MAX_SIZE Bytes1 Byte1 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: 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.

Table 2-5 BSL-Based Protocol Commands
CommandCMDByte1Byte2Byte3Byte4Bytelength-1
ERASE_SEGMENT0x12ADDR[L]ADDR[M]ADDR[H]XXX
ERASE_APP0x15XXXXXX
RX_DATA_BLOCK0x10ADDR[L]ADDR[M]ADDR[H]DATA0XDATAn
TX_VERSION0x19XXXXXX
JUMP2APP0x1CXXXXXX

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).

Table 2-6 BSL-Based Protocol Slave Response
ResponseValueDescription
OK0x00Previous command executed correctly
HEADER_ERROR0x51Frame had incorrect header
CHECKSUM_ERROR0x52Frame checksum incorrect
PACKETZERO_ERROR0x53Length of packet = 0
PACKETSIZE_ERROR0x54Length of packet > MAX_LEN
UNKNOWN_ERROR0x55Error in Protocol
INVALID_PARAMS0xC5Parameters received for command are incorrect
INCORRECT_COMMAND0xC6Received Command is not valid
MSPBOOT_VERSION0 to 0xFFSent as response for TX_VERSION command (default is 0xA0)