SLAU847D October 2022 – May 2024 MSPM0L1105 , MSPM0L1106 , MSPM0L1227 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1305 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346 , MSPM0L2227 , MSPM0L2228 , MSPM0L2228-Q1
In dual-bank/quad-bank devices, based on which bank (or pair) is executable, that bank (pair) gets read-execute privileges and loses write/erase privileges. The other bank (or pair) is readable, and writeable but not executable. This mechanism enforces the policy that any firmware update can only be saved in the writeable bank in the current session but can never be executed.
Upon a subsequent BOOTRST, the CSC runs and needs to authenticate the update and decide if the updated image should be made executable. If yes, then the bank holding the updated image can be configured to become executable (this is done by configuring the SYSCTL.SECCFG.FLBANKSWP.USEUPPER to 1 along with the correct KEY value of 0x58). When the CSC issues INITDONE, this bank-swap will take effect, swapping the execution/write privileges of the upper and lower banks as well as re-mapping the upper bank (or pair) to the lower half of the flash memory address space and re-mapping the upper bank (or pair) to the upper half of the flash memory address space.
Creating swappable configurations is a two-step process.
At any time, status of the bank swap policy and the currently executable bank can be obtained by reading the SYSCTL.SECCFG.SECSTATUS register. Fields FLBANKSWPPOLICY and FLBANKSWP provide this status.