SLAAEC9 july   2023 MSPM0L1306 , MSPM0L1306

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2LFU Bootloader Features Overview
  6. 3Hardware and Software Setup
    1. 3.1 Hardware Requirement
    2. 3.2 Software Setup
  7. 4LFU Bootloader Implementation
    1. 4.1 LFU Bootloader and Application Projects
    2. 4.2 Memory Allocation
    3. 4.3 LFU Bootloader Implemented
    4. 4.4 LFU Application Code Implementation
      1. 4.4.1 The Linker Command File for Application
      2. 4.4.2 Peripheral and Interrupt Initialization
      3. 4.4.3 Debug for Application Project
    5. 4.5 Invoke Firmware Upgrade Process
  8. 5Host GUI Tool Introduction
    1. 5.1 LFU Firmware Update
    2. 5.2 Application Project Link Files Generation
    3. 5.3 Non-Main Flash Configuration Firmware Generation
      1. 5.3.1 Steps to Generate the Non-Main Flash Configuration Firmware
      2. 5.3.2 UNIFLASH Tool to Program the NONMAIN Flash Configuration Data
  9. 6LFU Bootloader Protocol
    1. 6.1 Packet Format and Core Commands
    2. 6.2 Special Commands in LFU Bootloader
    3. 6.3 Host Device Firmware Upgrade Flow
  10. 7Migration to Other MSPM0 Devices
  11. 8References

Host Device Firmware Upgrade Flow

GUID-20230421-SS0I-HJWZ-RNKQ-PPLSVTBJ7TBB-low.svg Figure 6-1 LFU Host Operation Flow

Below are two steps need to be performed before starting firmware upgrade process:

  1. Send one-byte command 0x55 to check application code execution status, so that you know which application code need to be upgraded.
  2. Send one-byte command 0x11 to check bootloader status, if device responds 0x51, means that bootloader is in active status and is ready for firmware upgrade. Otherwise, you need to send one-byte command 0xAA to force bootloader from suspend to active status first.

When you are sure bootloader is in active status, send the password to unlock the device first, then erase the needed flash space and program new application code.

Here are tips to send the application code.

  • Make sure the application code .txt file is 16-byte aligned. The host software is responsible to fill unused space with dummy data bytes, make sure the .txt file is 16-byte aligned, see Figure 6-2 and Figure 6-3.
    GUID-20230504-SS0I-VN8M-TTH8-0RFQSJRFDNHP-low.png Figure 6-2 Unaligned Firmware
    GUID-20230504-SS0I-MTK5-77LJ-VT8G2VJGBZNS-low.png Figure 6-3 Aligned Firmware
  • Send the first line (first 16 bytes in the firmware) of the new application’s firmware in the end. This is to avoid the case an uncompleted firmware be executed unexpected. For current bootloader just to check if the first 8 bytes are all 0xFF to check if the application firmware exist, it will not check if the firmware to be completed. If you send the first line of the firmware in the end, that makes sure that the whole firmware has been sent successfully.

After programming new application code, send the command CMD start application to execute new application code.