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
A region of flash memory can be configured for read-execute protection - read and instruction fetch accesses to this region will return an error. CPU, DMA and debugger accesses are all treated the same way. This is configured by writing to the SYSCTL.SECCFG.FRXPROTMAINSTART and SYSCTL.SECCFG.FRXPROTMAINEND registers with the start and end addresses of the range to be protected respectively. Both addresses are set up for writing at 64B granularity. To enable this protection, the FLRXPROT bit must be ENABLED (1) by writing to SYSCTL.SECCFG.FWENABLE register along with the correct KEY value (0x76).
At any time, status of the RX protection can be obtained by reading the SYSCTL.SECCFG.SECSTATUS register. The FLRXPROT field provide this status.
This mechanism is useful in scenarios where it may be required to prevent re-execution of the CSC. The protected address range of the CSC essentially runs only once at BOOTRST and can not subsequently be re-executed. Note that caution needs to be exercised in configuring the flash memory range that is configured for this protection. Address space that holds the interrupt vectors or the portion of CSC that needs to be able to run a second time after BOOTRST should not be execute-protected.