MSPM0L2228: Flash Programmer error for "secondary_bsl_uart"

Part Number: MSPM0L2228
Other Parts Discussed in Thread: SYSCONFIG, UNIFLASH

Hi, 
I'm trying to use a sample software of TI for MSPM0L2228 "secondary_bsl_uart"

But the following error was shown and can't start the software.
Could you tell me how to resolve this issue???


1) Execute CCS
2) "Get Started Screen" is shown
3) Click "Browse software and examples"
4) Import "secondary_bsl_uart" from "Arm-based microcontrollers/Embedded Software/..."
5) Select "MSPM0L2228" for Target device
6) Click "NEXT" button
7) Re-build from the menu "Project/Rebuild Projects"
8) The following 2 warning are shown

[10]warning: /ti/project_config/ProjectConfig: Project Configuration File generation is disabled for this project. SysConfig Project Migration is not currently supported for this project.
[11]warning: /ti/driverlib/NONMAIN staticWriteProtectionNonMain: This locks the configuration permanently unless BCR factory reset is enabled with or without password.

[43]warning #10247-D: creating output section ".binit" without a SECTIONS specification

9) Connect the Lauchpad with USB cable to PC
10) LED2 on the Lauchpad turn on to Green
11) Click "Debug Project" from "EXPLORER" pain on the left side of CCS
12) The following messages are shown on the "Debug output" area and the sample software was not loaded to the launchpad.

Flash Programmer: Device does not contain data bank
File Loader: Memory write failed: Flash Programmer: MAIN/NONMAIN/DATA erase failed!
GEL: File: C:\Users\backend-soft01\workspace_ccstheia\secondary_bsl_uart\Debug\secondary_bsl_uart.out: Load failed.

  • Hi Susumu,

    Can you verify if you have configured the project to also erase NONMAIN?

    If not, you can do so by right-clicking on the project and clicking on Properties...

    From there, go to the Debug tab and in the Category drop-down, select MSPM0 Flash Settings:

    Note: after flashing, you may receive this error:

    This is expected. Simply reload CCS (ctrl + R) and disconnect and reconnect the board. You can confirm if the software was loaded on to the device by starting a project-less debug and inspecting the memory at 0x2000:

    Best,

    Owen

  • Hi Owen, 

    Thank you for your support.

    I could confirm that the software seems to be loaded properly by inspecting the memory at 0x2000 based on your reply.

    However, after a few trial flashing, the software stopped working and the following diagnostic code appeared on CCS.

    Could you tell me how to fix this issue???

    CS_DAP_0: Device diagnostic read = 0x00000036
    CS_DAP_0:
    Possible root causes could be one or multiple of the following:
    1) Invalid CRC configuration
    2) Invalid BCR configuration
    3) Invalid BSL configuration

    Possible recovery method:
    1) Perform a DSSM factory reset
    2) If method one does not work please remove power, hold nRST low, connect the device while nRST is held low, and then perform a DSSM factory reset

    Best Regards, 

    Susumu

  • Hi Susumu,

    Can you clarify what you mean by trial flashing? Were you trying to flash the secondary BSL? Were you trying to flash application code to the device using the secondary BSL?

    Are you able to recover the device using the factory reset sequence?

    Best,

    Owen

  • Hi Owen,

    The "trial flashing" means to program all of the flash memory of M0 uCOM by CCS and/or "Uniflash".

    Not only the secondary BSL, but also the other area of flash memory.

    The factory reset didn't work to recover the device.

    But the diagnostic read = 0x00000036 can be seen on the CCS.

    im sorry im not sure the procedure to cause this phenomena in detail because i realized it after a few hours...

    Best Regards, 

    Susumu

  • Hi Susumu,

    I think I may not be understanding the entire situation, but if you flashed the secondary BSL and then attempted to flash another program to the device, there can be issues if the application code exceeds 0x2000 in memory (the location of the bootloader). This part of memory is static write protected in the SDK example, so any attempt to write in this region will not be allowed. 

    It is also possible to brick a device if you erase NONMAIN and don't re-flash it before power cycling.

    I would suggest trying the steps outlined in Section 7.1 in the MSPM0 MCUs Development Guide on how to Unlock a Device.

    The MSPM0 NONMAIN FLASH Operation Guide may also be a helpful guide to read over.

    You can also flash your application code into the device using the secondary BSL.

    Here is some helpful documentation on the BSL:

    Best,

    Owen

  • HI Owen, 

    I tried the following 4 method to recovery the device.

    But it doesn't fixed this issue.

    Do you have any other idea for this issue???

    7.1.1 Unlock Through Bootloader

    7.1.2 Unlock Through Factory Reset GUI Tool

    7.1.3 Unlock Through Uniflash

    7.1.4 Unlock Through CCS

    *** Log message of CCS ***

    [2026/1/13 9:10:20] [INFO] CS_DAP_0: GEL Output: Initiating Device Mass Erase
    [2026/1/13 9:10:20] [INFO] CS_DAP_0: GEL Output: Attempting CS_DAP connection
    [2026/1/13 9:10:20] [INFO] CS_DAP_0: GEL Output: Attempting SEC_AP connection
    [2026/1/13 9:10:20] [INFO] CS_DAP_0: GEL Output: Command Sent
    [2026/1/13 9:10:21] [INFO] CS_DAP_0: GEL Output: Start hardware Reset using NRST
    [2026/1/13 9:10:21] [INFO] CS_DAP_0: GEL Output: Initiating BOOTRST Board Reset
    [2026/1/13 9:10:22] [INFO] CS_DAP_0: GEL Output: Reset line asserted
    [2026/1/13 9:10:22] [INFO] CS_DAP_0: GEL Output: Reset line de-asserted
    [2026/1/13 9:10:22] [INFO] CS_DAP_0: GEL Output: Board Reset Complete
    [2026/1/13 9:10:22] [INFO] CS_DAP_0: GEL Output: Reset done
    [2026/1/13 9:10:22] [INFO] CS_DAP_0: GEL Output: SEC_AP Disconnect
    [2026/1/13 9:10:22] [INFO] CS_DAP_0: GEL Output: SEC_AP Reconnect

    *** Screenshots of UniFlash ***

    Best Regards, 

    Susumu

  • Hi Susumu,

    It appears you attempted to issue a Mass Erase rather than a Factory Reset. Please follow the steps below:

    1. Disconnect device and hold NRST button
    2. Load Uniflash, configure it to the right target, and prepare the factory reset manual button ready
    3. Connect the device while holding NRST button, and then click on the factory reset manual button
    4. Follow the instructions from the prompt that follows
    5. The device should now be unlocked. If not try two more times. If nothing, then the device is bricked

    Best,

    Owen

  • Hi Owen,

    I tried based on the procedure as you mentioned - a little bit changed... - ,
    but this issue was not resolved.
    Attached please find the screenshots of the operation result below.
    If you think the device was bricked, please close this ticket.

    I took the log file of Uniflash - ds.log(ca. 300kB) -, but I don't have any ideas to send it to your side...

    1. Disconnect device and hold NRST button
    2. Start Uniflash
    3. Connect the device while holding NRST button
    (No button to connect the device was shown if no connection is available)
    4. Configure Uniflash to the right target, and prepare the factory reset manual button ready
    5. Release the NRST button
    6. Click on the factory reset manual button
    7. LED2(Green) was turned ON after pushing the factory reset button
    8. LED1(RED) started to blink for a few time and continue to ON.
    9. Push the NRST button
    10. Uniflash screen was same even if I waited for a few minutes.

    Best Regards,
    Susumu

  • Hi Susumu,

    Did you press the NRST button after the Press the reset button... message appeared in the console?

    Is this a custom board or a LaunchPad (EVM)?

    You should be able to upload the log file as an attachment to your reply (Insert > Image/video/file).

    Best,

    Owen

  • Hi Owen,

    I tried again as you mentioned yesterday.

    1) Yes, I pressed the NRST button after the message was appeared.
    2) It's a LanchPad.
    3) It was not possible to upload the log file from my reply (Insert > Image/video/file). it seems too big to send it - ca. 400kB -.
    4) If I click the window of Uniflash after #6, the error message sometimes appears but it's depend on the timing to click the window fo Uniflash.

    1. Disconnect device and hold NRST button
    2. Start Uniflash
    3. Connect the device while holding NRST button
    (No button to connect the device was shown if no connection is available)
    4. Configure Uniflash to the right target, and prepare the factory reset manual button ready
    5. Release the NRST button
    6. Click on the factory reset manual button
    7. LED2(Green) was turned ON after pushing the factory reset button
    8. LED1(RED) started to blink for a few time and continue to ON.
    9. Push the NRST button
    10. Uniflash screen was same even if I waited for a few minutes.

    Best Regards,
    Susumu

  • Hi Susumu,

    The MSPM0 NONMAIN FLASH Operation Guide outlines some more steps we can try.

    In Section 8.2, there are other methods for unlocking an MSPM0 Device. Can you try these methods and see if they work for you?

    Section 8.3.8 also covers the error that you are observing:

    If none of these steps work, then it is very likely that the device is bricked and cannot be recovered.

    Best,

    Owen

  • Hi Owen,
    I tried the following procedures as the documents that you mentioned.
    But the issue can't be resolved.
    I think the device is bricked.
    Do you agreee?

    #1

    1. Disconnect device and hold NRST button only.(S1 button was not pressed)
    2. Start Uniflash
    3. Connect the device while holding NRST button.
    4. LED2(Green) was turned ON.
    5. Configure Uniflash to the right target and push Start button on the Uniflash.
    6. Push the factory reset manual button.
    7. LED1(RED) started to blink for a few time and continue to ON.
    8. The screen that is attached to this thread was shown - UniFlash-FactoryReset-20260119-1.png

    9. Push the Retry button
    10. The screen was same as #8 above even if I waited for a few minutes.


    #2

    1. Disconnect device and hold NRST button and S1 button that is connected to PA18.
    2. Start Uniflash
    3. Connect the device while holding NRST button and S1 button.
    4. LED2(Green) was turned ON.

    5. Configure Uniflash to the right target and push Start button on the Uniflash.
    6. Nothing appears in the CSS console window.
    7. Release the S1(PA18) button.

    8. Release the NRST button.

    9. Nothing appears in the CSS console window.
    10. Push the factory reset manual button.
    11. LED1(RED) started to blink for a few time and continue to ON.
    12. The screen that is attached to this thread was shown - UniFlash-FactoryReset-20260119-2.png


    13. The screen was same as #11 above even if I waited for a few minutes.
    14. The screen was same as #10 above even if I waited for a few minutes.

    Best Regards,
    Susumu

  • Hi Susumu,

    If you held the reset button until the console prompted you to press the reset button (releasing the button here is equivalent), and you weren't able to recover the device, it is bricked.

    When working with NONMAIN, ensure that it is never left erased before power cycling the device. If NONMAIN is not flashed before power cycling, it will brick the device and will no longer be recoverable.

    The MSPM0 NONMAIN Flash Operation Guide and BSL documentation shared above will be useful to prevent locking up devices in the future.

    Best,

    Owen