SPRUIU9B August   2020  – September 2022 TMS320F280033 , TMS320F280034 , TMS320F280034-Q1 , TMS320F280036-Q1 , TMS320F280036C-Q1 , TMS320F280037 , TMS320F280037-Q1 , TMS320F280037C , TMS320F280037C-Q1 , TMS320F280038-Q1 , TMS320F280038C-Q1 , TMS320F280039 , TMS320F280039-Q1 , TMS320F280039C , TMS320F280039C-Q1 , TMS320F280040-Q1 , TMS320F280040C-Q1 , TMS320F280041 , TMS320F280041-Q1 , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280045 , TMS320F280048-Q1 , TMS320F280048C-Q1 , TMS320F280049 , TMS320F280049-Q1 , TMS320F280049C , TMS320F280049C-Q1 , TMS320F28P550SJ , TMS320F28P559SJ-Q1

 

  1.   Live Firmware Update Without Device Reset on C2000 MCUs
  2.   Trademarks
  3. 1Introduction
  4. 2Key Innovations
  5. 3Building Blocks for LFU
  6. 4Details of Proposed Solution
    1. 4.1 Flash Bank Organization
    2. 4.2 LFU Concepts and Factors Impacting Performance
    3. 4.3 Hardware Support for LFU
      1. 4.3.1 Multiple Flash Banks
      2. 4.3.2 Interrupt Vector Table Swap
      3. 4.3.3 RAM Block Swap
      4. 4.3.4 Hardware Register Flags
    4. 4.4 LFU Compiler Support
    5. 4.5 Application LFU Flow
  7. 5Results and Conclusion
  8. 6Revision History

LFU Concepts and Factors Impacting Performance

The key considerations when creating LFU-ready firmware are operational continuity during LFU, and LFU switchover time. These two are closely related. Operational continuity is achieved through the persistence of state, keeping existing static and global variables in RAM at the same addresses between firmware versions, and avoiding re-initialization of those variables when the new firmware is activated. LFU Compiler support enables this.

Activating the new firmware involves branching to the LFU entry point of the new firmware, executing the compiler's LFU initialization routine, arriving inside the main() of the new image, and performing additional initialization. This is where interrupts are briefly disabled, and initialization that needs interrupts to be disabled is performed (for example, Interrupt vector updates, function pointer updates), before interrupts are re-enabled. This last time interval is defined as the LFU switchover time.

LFU is simplified when there is hardware support to swap Flash banks, where either Flash bank can be mapped to a fixed address space, considered the Active bank. The Inactive bank is mapped to a different address space and is the bank that is updated. C2000™ MCUs do not currently support Flash bank swap, so active and inactive banks need to be tracked, and you need to use the linker command file to create application firmware targeted to specific banks.

Function pointers and Interrupt vectors need to be re-initialized inside main(), since their locations are different between Flash banks. C2000 MCUs support a large number of interrupt vectors (typically 192), so it is not practical to re-initialize all of them. Usually, only a few are used, and the rest are assigned to a default vector. LFU-specific hardware features (Interrupt vector swapping, RAM block swapping) enable a significant reduction in the LFU switchover time.