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 Execution Overview

This section details a high-level understanding of the execution flow and an abstracted memory map showing how the two banks of flash are used. The execution of the device is divided into two distinct phases. A Privileged and Unprivileged flow. The following flow shows this distinction with the line separating the upper (privileged) and lower (unprivileged) phases.

  • The issuing of INITDONE is the official transition from the privileged state to the unprivileged, enabling security.
  • The Customer Secure Code is run both times, thus the same body of code contains two execution paths, depending on the state.
  • The privileged state must happen before the unprivileged state, and this is not possible to transition back to the privileged state without a BOOTRST.
  • This satisfies a one-time Trusted Execution Environment (TEE) as described by some Secure Boot documentation.
  • Unprivileged mode has additional activated features, such as firewalls and the Read or Execute bank policy.
  • The application is only ever run in the unprivileged mode.
  • The state can be determined by the Customer Secure Code by reading whether INITDONE has been issued.
  • A SYSRST does not enter the privileged state, and security policies are retained.
 CSC Execution Overview Figure 2-1 CSC Execution Overview