SPRADN2 January   2025 MSPM0G1518 , MSPM0G1519 , MSPM0G3518 , MSPM0G3519 , MSPM0L1227 , MSPM0L1228 , MSPM0L2227 , MSPM0L2228

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Nonvolatile Memory (NVM) Basic Introduction
    1. 1.1 Flash Memory Protection
  5. 2Customer Secure Code (CSC) Introduction
    1. 2.1 CSC Execution Overview
    2. 2.2 CSC Memory Maps
    3. 2.3 CSC Execution Process
  6. 3Bank Swap Example Implementation
    1. 3.1 CSC Code Project Preparation
      1. 3.1.1 Enable CSC in NONMAIN
      2. 3.1.2 Implementation of CSC Application Code - Bank Swap Feature
    2. 3.2 Application Code Project Preparation
  7. 4Common Use Case Introduction
  8. 5Data Bank Introduction
    1. 5.1 Data Bank Protection
    2. 5.2 Data Bank Erase Write Operation
  9. 6Summary
  10. 7References

CSC Memory Maps

A memory map of the components with a single image slot per bank is shown below. The following illustrates the bank swap policy.

 CSC Memory Map Figure 2-2 CSC Memory Map

The memory map shows the basic behavior of the Bank Swap, and how the CSC is executed.

Prior to INITDONE, the customer secure code always runs from PB0. Post INITDONE, the customer secure code is executed from either PB0 or PB1, depending on the bank swap execution. And, if the bank swap function executed, then the PB1 is re-mapped to address 0x0.

The customer secure code shown in blue is identical across both banks. This means that both CSCs are compiled to run with respect to 0x0000.0000 and are identical, with the symbols being duplicated. At either state, only the code in LB0 needs to be run. Thus, no matter which physical bank is in this region, the CSC runs as expected.