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.

CCS: Problems when debugging CC3200 Launchpad in SWD mode

Other Parts Discussed in Thread: CC3200, CC2650, CC3200SDK

Tool/software: Code Composer Studio

Hi!

I have modified the http_client_demo, and I am now able to debug the application with CCS 7.1.0.00016 using JTAG. However, switching to 2-wire SWD mode, the debugger seems to loose contact with the target somehow. I don't get any error messages, but the debugger seems unresponsive after a short while. This situation is reproducible, and it seems to loose contact when calling sl_start() the first time. From Terra Term I can also observe that the code execution hangs since no more messages are issued from the evaluation board.

Do you have any suggestions of how to solve this problem? The reason I need this to work is that we currently want to debug another reference design of yours set up with a 2-wire SWD.

Best regards,

Jan Gustav

  • Jan,

    The issue you reported is familiar to me; I recall this was reported a while ago but we here at TI were never able to reproduce it. Some developers this being fixed in CCSv6.1.3, but since you are reporting in CCSv7.1.0.00016 that certainly warrants looking at it again.

    Tomorrow I will borrow a CC3200 and retest on my setup. Hopefully I can reproduce and finally get to the bottom of this long time lingering issue.

    Just for your reference, please check one thread where this is discussed and a related thread that talks about the JTAG pin muxing with other functions.

    e2e.ti.com/.../418666
    e2e.ti.com/.../514609

    Regards,
    Rafael
  • Hi!

    Thanks for looking into this. It would be great if this could be solved. I suspect the problem is related to CCS as I have also tried to debug the CC3200 in SWD mode using the XDS110 probe located on the CC2650 launchpad. I experience the same problem here.

    In the meantime I will look into the threads you refer to.

    Best regards,

    Jan

  • Jan

    I just ran the CC3200 on SWD mode in my CCSv7.1.0.00016 but was unable to find any issues.

    A quick question that may seem obvious but I need to ask: are you configuring your Launchpad according to the following settings?

    I will keep investigating and trying to "break" my setup, but the detail above may be relevant to your setup.

    Regards,

    Rafael

  • Hi Rafael!

    Thanks for feedback. Yes, I have checked off this box. Did you try out extensive debugging, setting a brakpoint after sl_start()? As described previously the target configuration test passes and the debugger hits the initial breakpoint. If you are able to pass this point it would be great if you could send me the CC3200-SWD.xml file you are using. In addition it would be nice if you could tell me what frequency you have set under Advanced tab. Does these settings seem OK?

    Best regards,

    Jan Gustav

  • Hi again!

    Sorry, but I sent you the wrong snippet. I have also tried with the XDS110 probe getting the same result. For the Stellaris debugger on the CC3200 Launchpad, I have the following settings.

    Best regards,

    Jan Gustav

  • Jan Gustav Heber said:
    However, switching to 2-wire SWD mode, the debugger seems to loose contact with the target somehow.

    Are you running CCS under windows or Linux?

    I had previously reported CCS 6.1.2.00014 under Linux has error loading program to CC3200 in SWD mode. SDSCM00052733 was raised for that problem, but isn't reported as fixed yet.

  • Hi!

    Thanks for feedback. However, I am running CSS under Windows 10. Note that I am able to download the code and start debugging/stepping, but it seems like debugger looses control/get unresponsive after sl_start() command, although I get no error messages.

    Best regards,

    Jan Gustav Heber

  • Jan Gustav Heber said:
    Note that I am able to download the code and start debugging/stepping, but it seems like debugger looses control/get unresponsive after sl_start() command, although I get no error messages.

    I tried to repeat the problem with a ArduCAM CC3200 UNO running the scan_policy example from CC3200SDK_1.1.0. Used CCS 7.1.0.00016 running under Windows 7.

    At first used the on-board Stellaris ICDI set to SWD mode and could step over calls to sl_Start() without a problem, and the example could successfully obtain the network list.

    Then changed to use a XDS110 set to "SWD Mode - Aux COM port is target UART port". When using the XDS110 when went to step-over the first sl_Start() the program appear to hang. When  the program was suspended the following callstack was shown:

    The _SlNonOsMainLoopTask() function the program was in appears to be waiting for an interrupt to occur.

    Looking at the Debug project properties the interrupts were disabled when assembly stepping or source stepping, which is the CCS default for new projects:

    I changed the project properties to de-select the disabling of interrupts when assembly stepping or source stepping, and with the XDS110 set to SWD mode was then able to step over calls to sl_Start().

    Suggest you therefore de-selecting  the disabling of interrupts when assembly stepping or source stepping to see if that solves your problem.

    As to why JTAG worked in your case, but not SWD, it could be timing related since other tests with XDS110 have shown that a 4-wire JTAG mode has a faster step time than a 2-wire mode (see CCS/SIMPLELINK-CC2640R2-SDK: Faster Debug Stepping?)

  • Hi!

    Thanks for a thorough reply. I have now tested both the Stellaris ICID and the XDC110 debuger probes in SWD mode, and both now work with the suggested settings. Swithing a bit forth and back with the settings I see that I sometimes get the Stellaris to work with the options ticked off. Having the timing in mind, it could be related to the fact that I now have connected the USB cable directly to the PC while at work I have the USB cable connected via an USB hub. Does this make any sense?

    Anyway, I am really happy that you were able to solve this problem so quickly.

    Thanks!

    Best regards,

    Jan Gustav