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 Error connecting to the target: Error -1170

Other Parts Discussed in Thread: ENERGYTRACE

Hi All,

I was debugging all day without a problem, and all the sudden, I changed a large section of the code, and I go

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 0.0.0.0)

Later, I took the MSP432 eval board home and tried it on my own personal computer, which was never turned off, with CCS already loaded, and I got exactly the same. I noticed the red LED above the reset button will blank once before the error message. The green LED stays lit. 

Is it dead?

  • Hi Albert,

    Can you try doing a factory reset to erase the device, following the steps in http://www.ti.com/lit/pdf/slau575 section 7? This should erase the code from the part, in case your code might have set something that is causing the debugger to have trouble accessing the part.

    Regards,
    Katie

  • I can't connect to run the debugger eithre. I got the same message. The new code never made it to the board. I got the message while trying to program it. The code is actually an example code that shuts down everything and goes into LMP3.
  • Hi Albert,

    Can you provide the code so we can try to reproduce it?

    You should be able to do a factory reset - it is a different process than just loading new code - you don't simply debug but you connect in a different way, by going in through the target configurations to connect to the debugger without actually needing to connect to the MSP432. You have to follow the steps in www.ti.com/.../slau575 section 7 from pages 22-26 exactly. If you are doing that and getting an error along the way, perhaps providing a screenshot would help us to see what part of the process is giving you the error.

    Regards,
    Katie
  • The code I was trying to use was provided by another Ti employee, which is mentioned here 

    https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/416484

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/166/7853.main.c

    But the error appeared before a sucessful write.

    As you can see below, I didn't have any luck connecting to DAP. I tried to run the factory reset script anyways, but not luck.

    e2e.ti.com/.../7853.main.c

  • Hi Albert,

    Thanks for providing more information - I'm sorry to hear of your troubles. I'm going to talk to some people who are looking into a similar issue that is in work (see other thread linked below) and show them your issue as well.

    As a note, on some other recent threads, I've seen people run into an issue with a factory reset using the Launchpad on-board emulation, but some of them were able to do the factory reset using one of the other emulation tools for the MSP432 to perform the factory reset: e2e.ti.com/.../1547956

    Regards,
    Katie
  • Albert - one more question.

    I know that you said the code you were trying to load was the LPM3 example provided in that other thread that you linked - but what was the code that you were debugging when you very first had the issue? It doesn't matter what code you are trying to load now, but rather what matters is what code is already currently in the part from the last time you programmed it before you had the issue. You mentioned some code that you had recently changed a big chunk of. Is this code that you'd be able to share (so that we can reproduce the issue)? If needed you can send it in a private message.

    Regards,
    Katie
  • Here is the code I had on the MCU. I ran it many test with energytrace without any problems. I Also used a 8.2 shunt at the return ground to measure the consumption using a super capacitor to compare the results. I switched between shunt, and energytrace many times without any problems. All I wanted to see was the peak current at turn on, and how long it take before it actually goes to sleep. Notice a lot of code are just comments. After the test, I thought I must be doing something wrong if the MCU is drawing 100~120uA during LPM3 even with ISR disabled. So I commented out the entire Main{} function, and replaced it with Ryan 's 7853.main.c. When I tried to program it, the error appeared before an actual write. I took the eval board home and tried it on my home laptop which was never turned off (which was working with the same code), with CCS &code already on the screen, tried to program it, and got the exact same error.. cannot connect.

    int main(void)
    {
    /* Halting the Watchdog */
    MAP_WDT_A_holdTimer();

    /* Terminating all unused pins to minimize power consumption. This is
    done by register accesses for simplicity and to minimize branching API
    calls */
    DIO->rPADIR.r = 0xFFFF;
    DIO->rPBDIR.r = 0xFFFF;
    DIO->rPCDIR.r = 0xFFFF;
    DIO->rPDDIR.r = 0xFFFF;
    DIO->rPEDIR.r = 0xFFFF;
    DIO->rPAOUT.r = 0;
    DIO->rPBOUT.r = 0;
    DIO->rPCOUT.r = 0;
    DIO->rPDOUT.r = 0;
    DIO->rPEOUT.r = 0;

    /* Configuring P1.1 as an input and enabling interrupts */
    /*
    MAP_GPIO_setAsInputPinWithPullUpResistor(GPIO_PORT_P1, GPIO_PIN1);
    MAP_GPIO_clearInterruptFlag(GPIO_PORT_P1, GPIO_PIN1);
    MAP_GPIO_enableInterrupt(GPIO_PORT_P1, GPIO_PIN1);
    MAP_Interrupt_enableInterrupt(INT_PORT1);
    Interrupt_enableSleepOnIsrExit();
    */

    /* Starting LFXT and sourcing ACLK and BCLK from it */
    MAP_CS_setExternalClockSourceFrequency(32000,48000000);

    /*
    MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_PJ,
    GPIO_PIN0 | GPIO_PIN1, GPIO_PRIMARY_MODULE_FUNCTION);*/
    MAP_CS_startLFXT(false);
    MAP_CS_initClockSignal(CS_ACLK, CS_LFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
    MAP_CS_initClockSignal(CS_BCLK, CS_LFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
    /* Disabling high side voltage monitor/supervisor*/
    MAP_PSS_disableHighSide();


    /* Enabling "rude" mode which forces device to go to sleep regardless of outstanding clock requests*/

    MAP_PCM_enableRudeMode();

    /* Enabling MASTER interrupts */
    /* MAP_Interrupt_enableMaster();*/
    MAP_PCM_gotoLPM3();

    /* Going to LPM3 */
    while (1)
    {
    /*MAP_GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN0);*/
    MAP_PCM_gotoLPM3();
    }
    }

    /* GPIO ISR
    void gpio_isr(void)
    {
    uint32_t status;

    status = MAP_GPIO_getEnabledInterruptStatus(GPIO_PORT_P1);
    MAP_GPIO_clearInterruptFlag(GPIO_PORT_P1, status);

    if(status & GPIO_PIN1)
    {
    MAP_GPIO_toggleOutputOnPin(GPIO_PORT_P1, GPIO_PIN0);
    }
    } */
  • Hi Albert,

    I tried your code and could not reproduce your issue. However, I did find one way to get the error message that you showed in your post above. IF the JTAG switch is set to the "Ext Debug" position but you are trying to debug with the Launchpad on board emulator, you'll see this error. Can you please check the position of this switch? It should be in the left, XDS-ET position. Then your debugging should work.

    If this is your issue, it also explains why you were unable to do the factory reset either and had it fail out immediately. Hopefully this switch just got bumped by accident because it would mean there's nothing wrong with your board and you could get up and running again.

    Regards,
    Katie
  • I've tried that before. Now that you mentioned again, I'm going to check it with a meter to see if the switch is actually making contact. 

    Update: I measured the pins with a meter from the back, it seems its making a good contact. Can I send this to you guys, with prepaid shipping both ways and see if you guys can unbrick it for me?

  • Hi Albert,

    Sorry to hear of your ongoing troubles (and sorry for the delay - I've been out of office most of the week and am catching back up).

    On our other thread, someone was able to recover the board by using another emulator they had handy: e2e.ti.com/.../1567672 Would you have something like that available?

    Regards,
    Katie

**Attention** This is a public forum