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.

MSPM0L1306: Could not connect to target

Part Number: MSPM0L1306
Other Parts Discussed in Thread: SEGGER

I can't connect to device for programming anymore.

Using the Segger j-link-Ozone suite, I downloaded a firmware just once, i stepped-over the initialization function, then device stopped communicating with debugger and new connections became impossible.

Debugger console output is:

Device "MSPM0L1306" selected.
Found SW-DP with ID 0x6BA02477
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[0]: Stopped AP scan as end of AP map has been reached
Iterating through AP map to find AHB-AP to use
Attach to CPU failed. Executing connect under reset.
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[0]: Stopped AP scan as end of AP map has been reached
Iterating through AP map to find AHB-AP to use
Could not find core in Coresight setup
Found SW-DP with ID 0x6BA02477
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[0]: Stopped AP scan as end of AP map has been reached
Iterating through AP map to find AHB-AP to use
Attach to CPU failed. Executing connect under reset.
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[0]: Stopped AP scan as end of AP map has been reached
Iterating through AP map to find AHB-AP to use
Could not find core in Coresight setup
Found SW-DP with ID 0x6BA02477
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[0]: Stopped AP scan as end of AP map has been reached
Iterating through AP map to find AHB-AP to use
Attach to CPU failed. Executing connect under reset.
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[0]: Stopped AP scan as end of AP map has been reached
Iterating through AP map to find AHB-AP to use
Could not find core in Coresight setup
Found SW-DP with ID 0x6BA02477
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[0]: Stopped AP scan as end of AP map has been reached
Iterating through AP map to find AHB-AP to use
Attach to CPU failed. Executing connect under reset.
DPIDR: 0x6BA02477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[0]: Stopped AP scan as end of AP map has been reached
Iterating through AP map to find AHB-AP to use
Could not find core in Coresight setup
Connection failed.

Project created with CCS and syscfg, details attached.

Ozone v3.30b

J-Link v7.92c

Debugger: J-Link PLUS V12.00 (2023 Aug 2 10:34)

ccs_conf.txt

myProject.syscfg.txt
/**
 * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
 * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
 * @cliArgs --device "MSPM0L130X" --package "VSSOP-20(DGS20)" --part "Default" --product "mspm0_sdk@1.10.00.05"
 * @versions {"tool":"1.17.0+3128"}
 */

/**
 * Import the modules used in this configuration.
 */
const ADC12   = scripting.addModule("/ti/driverlib/ADC12", {}, false);
const ADC121  = ADC12.addInstance();
const Board   = scripting.addModule("/ti/driverlib/Board");
const GPIO    = scripting.addModule("/ti/driverlib/GPIO", {}, false);
const GPIO1   = GPIO.addInstance();
const PWM     = scripting.addModule("/ti/driverlib/PWM", {}, false);
const PWM1    = PWM.addInstance();
const SYSCTL  = scripting.addModule("/ti/driverlib/SYSCTL");
const SYSTICK = scripting.addModule("/ti/driverlib/SYSTICK");
const TIMER   = scripting.addModule("/ti/driverlib/TIMER", {}, false);
const TIMER1  = TIMER.addInstance();
const UART    = scripting.addModule("/ti/driverlib/UART", {}, false);
const UART1   = UART.addInstance();

/**
 * Write custom configuration values to the imported modules.
 */
const gate6  = system.clockTree["MFCLKGATE"];
gate6.enable = true;

ADC121.$name                      = "ADC12_0";
ADC121.samplingOperationMode      = "sequence";
ADC121.endAdd                     = 3;
ADC121.repeatMode                 = true;
ADC121.adcMem1chansel             = "DL_ADC12_INPUT_CHAN_1";
ADC121.adcMem2chansel             = "DL_ADC12_INPUT_CHAN_2";
ADC121.adcMem3chansel             = "DL_ADC12_INPUT_CHAN_3";
ADC121.adcMem0_name               = "AI_VBAT_MON";
ADC121.adcMem1_name               = "AI_MOTOR_P";
ADC121.adcMem2_name               = "AI_MOTOR_N";
ADC121.adcMem3_name               = "AI_MOTOR_I";
ADC121.sampClkSrc                 = "DL_ADC12_CLOCK_ULPCLK";
ADC121.peripheral.$assign         = "ADC0";
ADC121.peripheral.adcPin0.$assign = "PA27";
ADC121.peripheral.adcPin1.$assign = "PA26";
ADC121.peripheral.adcPin2.$assign = "PA25";
ADC121.peripheral.adcPin3.$assign = "PA24/OPA0.IN0-";
ADC121.adcPin0Config.$name        = "ti_driverlib_gpio_GPIOPinGeneric0";
ADC121.adcPin1Config.$name        = "ti_driverlib_gpio_GPIOPinGeneric5";
ADC121.adcPin2Config.$name        = "ti_driverlib_gpio_GPIOPinGeneric6";
ADC121.adcPin3Config.$name        = "ti_driverlib_gpio_GPIOPinGeneric7";

Board.genPeriphPinFile            = true;
Board.configureUnused             = true;
Board.peripheral.$assign          = "DEBUGSS";
Board.peripheral.swclkPin.$assign = "PA20";
Board.peripheral.swdioPin.$assign = "PA19";
Board.genFileMod.$name            = "ti_driverlib_BoardPins0";

GPIO1.$name                         = "GPIO_GRP_0";
GPIO1.associatedPins.create(6);
GPIO1.associatedPins[0].$name       = "DO_MOTOR_DIR";
GPIO1.associatedPins[0].pin.$assign = "PA6";
GPIO1.associatedPins[1].$name       = "DO_MOTOR_EN";
GPIO1.associatedPins[1].pin.$assign = "PA22";
GPIO1.associatedPins[2].$name       = "DI_ST_MOTOR";
GPIO1.associatedPins[2].direction   = "INPUT";
GPIO1.associatedPins[2].pin.$assign = "PA2";
GPIO1.associatedPins[3].$name       = "DI_SW_BWD";
GPIO1.associatedPins[3].direction   = "INPUT";
GPIO1.associatedPins[3].pin.$assign = "PA0";
GPIO1.associatedPins[4].$name       = "VBAT_SW_EN";
GPIO1.associatedPins[4].pin.$assign = "PA4";
GPIO1.associatedPins[5].$name       = "VBAT_MON_EN";
GPIO1.associatedPins[5].pin.$assign = "PA23";

PWM1.ccIndex                            = [0];
PWM1.$name                              = "DO_PWM_MOTOR";
PWM1.clockDivider                       = 4;
PWM1.timerCount                         = 400;
PWM1.peripheral.ccp0Pin.$assign         = "PA16";
PWM1.PWM_CHANNEL_0.$name                = "ti_driverlib_pwm_PWMTimerCC0";
PWM1.ccp0PinConfig.direction            = scripting.forceWrite("OUTPUT");
PWM1.ccp0PinConfig.hideOutputInversion  = scripting.forceWrite(false);
PWM1.ccp0PinConfig.onlyInternalResistor = scripting.forceWrite(false);
PWM1.ccp0PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
PWM1.ccp0PinConfig.$name                = "ti_driverlib_gpio_GPIOPinGeneric3";

SYSCTL.powerPolicy = "STANDBY1";
SYSCTL.clockTreeEn = true;

SYSTICK.periodEnable  = true;
SYSTICK.period        = 32000;
SYSTICK.systickEnable = true;

TIMER1.interrupts  = ["ZERO"];
TIMER1.timerClkSrc = "LFCLK";
TIMER1.timerPeriod = "10 ms";
TIMER1.$name       = "TIMER_WU";

UART1.$name                    = "UART_0";
UART1.targetBaudRate           = 115200;
UART1.peripheral.$assign       = "UART0";
UART1.peripheral.rxPin.$assign = "PA18";
UART1.peripheral.txPin.$assign = "PA17/OPA1.IN0-";
UART1.txPinConfig.$name        = "ti_driverlib_gpio_GPIOPinGeneric1";
UART1.rxPinConfig.$name        = "ti_driverlib_gpio_GPIOPinGeneric2";

/**
 * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
 * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
 * re-solve from scratch.
 */
PWM1.peripheral.$suggestSolution   = "TIMG0";
TIMER1.peripheral.$suggestSolution = "TIMG1";