Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

MSP432 LaunchPad: Debugging fails with 'Unable to connect to the target' error

Other Parts Discussed in Thread: UNIFLASH

Hi

I have a problem with the new MSP-EXP432P401R (hardware unchanged, out-of-the-box). It worked at the beginning, but has now stopped working, i.e. the debugger (XDS110 USB Debug Probe) is 'unable to connect to the target'. The exact error message is:

Error connecting to the target:
(Error -1170 @ 0x0)
Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
(Emulation package 5.1.641.0)


I have tried to switch to SWD mode, but without success. The error message in SWD mode is as follows:

CORTEX_M4_0: JTAG Communication Error: (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 5.1.641.0)


The output of the 'Test Connection' tool for the JTAG mode in the CCS is as follows:

This error is generated by TI's USCIF driver or utilities.

The value is '-233' (0xffffff17).
The title is 'SC_ERR_PATH_BROKEN'.

The explanation is:
The JTAG IR and DR scan-paths cannot circulate bits, they may be broken.
An attempt to scan the JTAG scan-path has failed.
The target's JTAG scan-path appears to be broken
with a stuck-at-ones or stuck-at-zero fault.

 

The connection test for SWD mode gives the following output:

This test will read the IDCODE register 100 times.
The IDCODE register value is 0x2ba01477.
The SWD Mode Integrity test has succeeded.


The green LED101 is on as soon as a USB cable is connected. The JTAG switch is in the correct position and the jumpers for 3 and 5V are mounted. I have also verified the voltages. I have also tried a factory reset as described in the MSP432 FAQ.

Luckily, I have ordered two MSP432 LaunchPads. So I plugged in a brand new board and tried to download a program onto the flash memory. I was able to flash the program once, but got the same error message when I tried to re-flash the program!
I have also changed the USB cable, the USB port and even the computer, but without success.

The code I used is the following (although I find it strange that the software has any impact on the debugger):

#include <driverlib.h>
#include <rom.h>            // comment to disable the ROM version of the driver library
#include <rom_map.h>

void main(void)
{
    MAP_WDT_A_holdTimer();
    MAP_Interrupt_disableMaster();

    P1DIR = 0xff; P1OUT = 0; P1SEL0 = 0; P1SEL1 = 0;
    P2DIR = 0xff; P2OUT = 0; P2SEL0 = 0; P2SEL1 = 0;
    P3DIR = 0xff; P3OUT = 0; P3SEL0 = 0; P3SEL1 = 0;
    P4DIR = 0xff; P4OUT = 0; P4SEL0 = 0; P4SEL1 = 0;
    P5DIR = 0xff; P5OUT = 0; P5SEL0 = 0; P5SEL1 = 0;
    P6DIR = 0xff; P6OUT = 0; P6SEL0 = 0; P6SEL1 = 0;
    P7DIR = 0xff; P7OUT = 0; P7SEL0 = 0; P7SEL1 = 0;
    P8DIR = 0xff; P8OUT = 0; P8SEL0 = 0; P8SEL1 = 0;
    P9DIR = 0xff; P9OUT = 0; P9SEL0 = 0; P9SEL1 = 0;
    P10DIR = 0xff; P10OUT = 0; P10SEL0 = 0; P10SEL1 = 0;
    PJDIR = 0xff; PJOUT = 0; PJSEL0 = 0; PJSEL1 = 0;

    MAP_GPIO_setAsInputPinWithPullUpResistor(GPIO_PORT_P1, GPIO_PIN1 | GPIO_PIN4);
    MAP_GPIO_interruptEdgeSelect(GPIO_PORT_P1, GPIO_PIN1 | GPIO_PIN4, GPIO_HIGH_TO_LOW_TRANSITION);
    MAP_GPIO_clearInterruptFlag(GPIO_PORT_P1, GPIO_PIN1 | GPIO_PIN4);
    MAP_GPIO_enableInterrupt(GPIO_PORT_P1, GPIO_PIN1 | GPIO_PIN4);

    MAP_PCM_setCoreVoltageLevel(PCM_VCORE0);
    MAP_CS_setDCOFrequency(1000000);
    MAP_CS_initClockSignal(CS_MCLK, CS_DCOCLK_SELECT, CS_CLOCK_DIVIDER_1);
    MAP_CS_initClockSignal(CS_HSMCLK, CS_REFOCLK_SELECT, CS_CLOCK_DIVIDER_1);
    MAP_CS_initClockSignal(CS_SMCLK, CS_REFOCLK_SELECT, CS_CLOCK_DIVIDER_1);
    MAP_CS_initClockSignal(CS_ACLK, CS_REFOCLK_SELECT, CS_CLOCK_DIVIDER_1);
    MAP_CS_initClockSignal(CS_BCLK, CS_REFOCLK_SELECT, CS_CLOCK_DIVIDER_1);

    MAP_Interrupt_enableMaster();
    MAP_PCM_gotoLPM3();

    while (1);
}

The problem seems to be related to LPM3 since my problems only started when I began to experiment with LPM3.

I am using CCS 6.1.0.00104 on Linux. I have also tried it on Windows.

Any ideas??

  • Hi,

    I was able to replicate the problem, and SLAU575 (www.ti.com/lit/pdf/slau575) explains a recovery mechanism for MSP432. Unfortunately, it doesn't seem to work with the XDS included in the launchpad, and I had to use an external one (XDS200).

    Here's a similar recent thread: e2e.ti.com/.../431831

    The problem in your code seems to be the configuration of PJSEL0, which overrides the JTAG pins. I tried the following changes to the code and the first line bricks the device, while the 2nd one works OK:
    PJDIR = 0xff; PJOUT = 0; PJSEL0 = 0; PJSEL1 = 0; // <-- bricks device
    PJDIR = 0xff; PJOUT = 0; PJSEL0 = 0x30; PJSEL1 = 0; // <-- Works OK

    We are submitting a bug to check if there's any way to recover the device without using an external tool, but for now it seems to be the only option.

    Regards,
    Luis R
  • Hi Luis

    Thanks a lot for your answer and for submitting the bug! I managed to download a program onto the device with an external debug emulator (ST Link) and it seems to run ok, but when I hit the reset button, the program seems to be gone...

    Also, I still can't access the device from CCS. Did you manage to get CCS and the XDS110 working again after using the external debug emulator? Is there a way to perform a factory reset in IAR with the ST-Link?

    Best,

    Reto

  • Hi Reto,

    Yes, I can access the device normally in CCS after I perform the factory reset with XDS200 in CCS.

    I haven't use ST-Link but this guide www.ti.com/.../slau574a.pdf talks about Factory Reset using J-Link and I-Jet.

    The FAQs also talk about problems with the XDS and recommend using SWD mode (which doesn't seem to work) but then points to the CCS guide.

    When you use the ST-Link, are you sure you are erasing the device and downloading a new image? Does the new application execute?

    Regards,
    Luis R

  • Hi



    It seems like the program gets debugged, but not actually downloaded to flash with the ST-Link...

    However, I have now tried to access the MSP432 with the external debugger XDS100v2, but without success. Could it be that restoring is not possible with the XDS100?



    Best,

    R
  • Hi R,

    I saw the same behavior with XDS100v2. The XDS200 worked for me, though.

    You tried changing to SWD mode (when possible) and you tried the Factory Reset workaround, right?

    The behavior seems inconsistent because the Factory Reset or SWD mode seem to work in some PCs with the same code example. But we are investigating the issue with high priority and we'll try to fix it as soon as we can.

    Regards,

    Luis R

  • Thanks a lot for the clarification. Glad to hear that you are investigating this issue!
    In the meantime, I have tried the factory reset with the XDS200 and it worked!

    Best,
    R
  • Hi Luis,

    Just to inform that doing other experiments, I had the same problem, It should be fine, that MSP432 Launchpad, have a Factory Default setting, through CCS_Uniflash.

    All the best,
    Tino
  • Hi Luis,

    I would like to inform that investigating in e2e, there is an alternative way, intead of XDS200, to Factory Reset MSP432, it worked for me e2e.ti.com/.../1652269

    Regards,
    Tino
  • The described procedure in the linked thread did NOT help in my case.

  • Hi my friend,

    Please check that last Code Composer Studio Ver. 6.1.1.00022 is installed in your computer, if you are nor sure, I would like to suggest to install all system again, and checking install log, not informing errors, I hope this will help

    Regards, Tino

  • I have similar Problems error connecting to the target :(Error -1063 @ 0x0) I use latest CCS6 and MSP-EXP432F401R failure occured while loading example Projects. now i can't access the device from CCS.
    Any solution ? Kind regards
    Timo

**Attention** This is a public forum