This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0G3107: Device Fails to Restart After Variable Initialization on MSPM0G3107

Part Number: MSPM0G3107

Hello TI Support Team,

I am using an MSPM0G3107 microcontroller, integrated with a graphic IC through the SPI protocol. I have created a user interface (UI) on the graphic IC, which generates the display control code. I then integrated this code into the TI MCU project.

The display works correctly — for example, when I set a variable for a specific image, the graphic IC activates and displays that image as expected.

However, I am facing a strange issue:
Everything works fine initially. But if I create or initialize a new variable in the code, and use it (for example, for debugging or printing on the terminal), the program runs fine the first time.
After that, when I press the reset button on the TI board, the device gets stuck, nothing appears on the display, and the MCU does not restart properly. Even powering off and on again doesn’t help.
The only way to recover the board is to re-flash (burn) the code again. Until I do that, the MCU remains unresponsive.
I am attaching a screenshot of the memory allocation from the CCS Theia. 


Could you please help me understand why this happens and suggest how to fix it?

Thank you for your support.

  • Hi,

    Simply creating a variable causes this issue?

    Could you show your code, so I can see what's going on?

    -Matthew

  • Hi,
    Thanks for your response.
    Actually, my project consists of many files (.c and .h), so it’s not feasible to share the entire code. However, I have attached a screenshot of the memory allocation after rebuilding the code in CCS Theia to give an idea of the memory usage.

    I am using a TI MCU 3107, which is integrated with a graphics IC, and a display is attached to this IC. There’s already a significant amount of code for this setup. The system works fine as long as I don’t add any new variables or use printf. However, once I add new variables or printf statements, the system behaves correctly until I restart the TI MCU. After a restart, the TI MCU fails to respond.

  • Hi,

    Are you doing any nonmain configurations?

    Are you using BSL? If not, then make sure it is disabled.

    -Matthew

  • You probably need to increase your stack size. My findings (over here) were that Xprintf take >800 bytes of stack (>1KB if you use "%f").