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 protection - read accesses to this region will return an error while instruction fetch accesses are allowed. CPU, DMA and debugger accesses are all treated the same way. This is configured by writing to the SYSCTL.SECCFG.FIPPROTMAINSTART and SYSCTL.SECCFG.FIPPROTMAINEND 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 FLIPPROT 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 IP protection can be obtained by reading the SYSCTL.SECCFG.SECSTATUS register. The FLIPPROT field provide this status.
This mechanism is useful in scenarios where it may be required to prevent code read-out of third-party vendor-supplied software IP. Note that code that is meant to be IP-protected must be compiled such that there are no embedded data accesses (literal fetches) to this region. Since data accesses return access errors, such code must be compiled with a flag such as -mexecute-only (TI Clang Compiler flag) to ensure no literal constant accesses are emitted.