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.

LP-MSPM0G3507: IAR debug fails if I use sprintf

Part Number: LP-MSPM0G3507
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hello,

I have a problem with this simple program

#include "ti_msp_dl_config.h"
#include <stdio.h>

int main(void)
{
float A = 3.2;
char Buffer [50];

  	SYSCFG_DL_init();
    sprintf(Buffer,"%f",A);
    
	while (1)
	{
    }
}

When I try to debug, I have the following error:

If I try to debug a second time, I have the following error:

If I remove   sprintf(Buffer,"%f",A); It works after unplug and replug the LP-MSPM0G3507

#include "ti_msp_dl_config.h"
#include <stdio.h>

int main(void)
{
float A = 3.2;
char Buffer [50];

  	SYSCFG_DL_init();
   // sprintf(Buffer,"%f",A);
    
	while (1)
	{
    }
}

What can be the root of this issue?

IAR 9.70.1

SysConfig 1.22.0+3893

Firmware: XDS110 (03.00.00.36) 

Best regards,

  • Hello

    I tried on another LP-MSPM0G3507, and it works! Here are the debug logs.

    Working LP-MSPM0G3507

    Thu Jul 03, 2025 15:40:31: Connecting to TI XDS110 ( Probe no: MG350001 ) COM[29/31]
    Thu Jul 03, 2025 15:40:31: Firmware: XDS110 (03.00.00.38) Embed with CMSIS-DAP
    Thu Jul 03, 2025 15:40:32: _ExecDeviceCoreConnect()
    Thu Jul 03, 2025 15:40:32: Checking security status...
    Thu Jul 03, 2025 15:40:32: DMAC: Checking device status...
    Thu Jul 03, 2025 15:40:32: DMAC: device is operating normally  <---Main Difference
    Thu Jul 03, 2025 15:40:32: DMAC: DEBUGPOWER, INHIBITSLEEP and HaltOnReset bits are set.
    Thu Jul 03, 2025 15:40:32: DMAC: FORCEACTIVE bit are set.
    Thu Jul 03, 2025 15:40:32: TI XDS, device revision: 0x00000001, big endian: false, cache: false, board revision: 0x00000000, driver revision: 0x0B020200
    Thu Jul 03, 2025 15:40:32: DMAC: Device/System Reset
    Thu Jul 03, 2025 15:40:32: Initial reset was performed
    Thu Jul 03, 2025 15:40:37: Digital States: Disabled because of no description file
    Thu Jul 03, 2025 15:40:37: Loaded debugee: C:\iar\ewarm-9.70.1\arm/config/flashloader/TexasInstruments/FlashMSPM0_16kB_M0G.out
    Thu Jul 03, 2025 15:40:37: Target reset
    Thu Jul 03, 2025 15:40:38: Unloaded macro file: C:\iar\ewarm-9.70.1\arm/config/flashloader/TexasInstruments/FlashMSPM0G1X0X_G3X0X.mac
    Thu Jul 03, 2025 15:40:38: Downloaded C:\Users\laurento\Documents\Dev\Iar\BaseMspm0\Debug\Exe\Base.out to flash memory.
    Thu Jul 03, 2025 15:40:38: 6872 bytes downloaded into FLASH (0.88 Kbytes/sec)
    Thu Jul 03, 2025 15:40:38: DMAC: Device/System Reset
    Thu Jul 03, 2025 15:40:38: Loaded debugee: C:\Users\laurento\Documents\Dev\Iar\BaseMspm0\Debug\Exe\Base.out
    Thu Jul 03, 2025 15:40:38: Download completed.
    Thu Jul 03, 2025 15:40:38: Target reset

    Not Working LP-MSPM0G3507
    Thu Jul 03, 2025 15:43:14: Connecting to TI XDS110 ( Probe no: MG350001 ) COM[29/31]
    Thu Jul 03, 2025 15:43:14: Firmware: XDS110 (03.00.00.38) Embed with CMSIS-DAP
    Thu Jul 03, 2025 15:43:15: _ExecDeviceCoreConnect()
    Thu Jul 03, 2025 15:43:15: Checking security status...
    Thu Jul 03, 2025 15:43:15: DMAC: Checking device status...
    Thu Jul 03, 2025 15:43:15: DMAC: DEBUGPOWER, INHIBITSLEEP and HaltOnReset bits are set.
    Thu Jul 03, 2025 15:43:15: DMAC: FORCEACTIVE bit are set.
    Thu Jul 03, 2025 15:43:15: TI XDS, device revision: 0x00000001, big endian: false, cache: false, board revision: 0x00000000, driver revision: 0x0B020200
    Thu Jul 03, 2025 15:43:15: DMAC: Device/System Reset
    Thu Jul 03, 2025 15:43:15: Initial reset was performed
    Thu Jul 03, 2025 15:43:20: Digital States: Disabled because of no description file
    Thu Jul 03, 2025 15:43:20: Loaded debugee: C:\iar\ewarm-9.70.1\arm/config/flashloader/TexasInstruments/FlashMSPM0_16kB_M0G.out
    Thu Jul 03, 2025 15:43:20: Target reset
    Thu Jul 03, 2025 15:43:21: Unloaded macro file: C:\iar\ewarm-9.70.1\arm/config/flashloader/TexasInstruments/FlashMSPM0G1X0X_G3X0X.mac
    Thu Jul 03, 2025 15:43:21: The flash loader program reported an error.
    Thu Jul 03, 2025 15:43:21: The debug log may contain more details. [Erase failed!]
    Thu Jul 03, 2025 15:43:25: Unloaded macro file: C:\iar\ewarm-9.70.1\arm/config/debugger/TexasInstruments/MSPM0G1X0X_G3X0X.dmac
    Thu Jul 03, 2025 15:43:25: Unloaded macro file: C:\iar\ewarm-9.70.1\arm/config/debugger/TexasInstruments/MSPM0_Dssm.dmac
    Thu Jul 03, 2025 15:43:33: Loading the TI XDS Driver driver
    Thu Jul 03, 2025 15:43:33: IAR Embedded Workbench 9.70.1 (C:\iar\ewarm-9.70.1\arm\bin\armproc.dll)

    Is it and hardware problem ?

    Best regards

  • Hi Laurent,

    On the non-working board, can you perform a factory reset, then flash with one of the TI example codes?

    If you need to I recommend executing a BSL invoke (hold NRST and BSL during power up then release NRST followed by BSL). By going into the BSL the device shouldn't execute your application code which should allow the device to either connect or reflash.

  • Hi Luke,

    I tried with CCS and I have the following error:

    CS_DAP_0: Error connecting to the target: (Error -615 @ 0x0) The target failed to see a correctly formatted SWD header. The  connection to the target may be unreliable. Try lowering the  TCLK setting before trying again. (Emulation package 20.2.0.3536) 

    File Loader: Memory write failed: Failed to connect

    Best regards

  • Hi Laurent,

    I see the launchpad is tagged as the device you're using, but I want to confirm if you're connecting with the launchpads on-board debugger.

    I would recommend the factory erase, I don't know what you've flashed to the board previously, but if you're using the TI launchpad and on-board debugger there could be some SW that is causing this connection issue.