Texas Instruments' MSPM0 devices include a region of flash called NONMAIN that is used to configure the device boot and security properties. This blog post will help users understand how to use PEmicro tools to program this region of flash for the various TI MSPM0 devices. The NONMAIN is located at address range 0x41C00000-0x41C00200 and needs to be properly programmed to avoid breaking the device. Note that if the NONMAIN region is left blank or not programmed properly, then the device will lock. To learn how to generate object files that target the NONMAIN region, please review this post from TI: Using SysConfig with MSPM0 For MSPM0G devices, the support is included in the corresponding programming algorithm for the selected device. The NONMAIN region can be programmed by simply queuing an object file that targets the NONMAIN region and programming it. To program the NONMAIN region for the MSPM0L1227, MSPM0L1228, MSPM0L2227, and MSPM0L2228, the base algorithm (i.e "TI_MSPM0L2228_128KB.ARP") should be used. The user command "NM: NONMAIN ERASE" is required prior to programming the NONMAIN region. The command "CE Chip Erase" can also be used to erase both MAIN and NONMAIN memory. It is suggested to use the NM NONMAIN ERASE user command for object files that target only the NONMAIN region and the CE Chip Erase command for object files that target both MAIN and NONMAIN. Once erased, program the object file and verify the result. The user should ensure that the values in the NONMAIN region pass verification so the device does not lock after disconnecting. For other MSPM0L devices, there is a NONMAIN algorithm dedicated to programming that region. The algorithm is titled with the selected device name followed by "512KB_NONMAIN.ARP". The user should load the corresponding algorithm to program the NONMAIN region of flash and queue the object file that targets the NONMAIN region. Before programming, the user must use the command "NM: NONMAIN ERASE" to erase the NONMAIN region of flash. The command is implemented to prevent accidental erasure of the region. It is suggested to use the PROGRAM RANGE command with the NONMAIN address range since most object files generated by Code Composer include both MAIN and NONMAIN. Once programmed, the user should ensure that verification passes so the device does not lock. MSPM0C devices also include a NONMAIN region but do not include the CRC registers used in the other devices. Much like the MSPM0L devices, there is an algorithm dedicated to target the NONMAIN region. The "NM ERASE NONMAIN" user command is required before programming the NONMAIN region. If the object file includes ranges in both MAIN and NONMAIN, then use the PROGRAM RANGE command with the start and end address of the NONMAIN region. Ensure that the verification passed to avoid locking the device. If using a Cyclone programmer, it is highly recommended to first use PROGACMP to test programming the NONMAIN region prior to using a Cyclone image. In the event the NONMAIN does not pass verification, then the user SHOULD NOT DISCONNECT the device from PROGACMP. Attempt to erase the NONMAIN region again and reprogram the file. If this continues to fail, the user can attempt to reconnect the device with the MASS ERASE UPON CONNECTION option enabled. This will attempt a factory reset to restore the NONMAIN region. If the device does not connect after the factory reset, it is likely locked and unrecoverable. MSPM0G Devices
MSPM0L Devices
MSPM0C Devices
Factory Reset