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.

TM4C129EKCPDT: Can code which causes a reset loop prevent the debugger from connecting?

Part Number: TM4C129EKCPDT
Other Parts Discussed in Thread: UNIFLASH

I have some test code (related to note 1 below) which triggers FaultISR() on startup.  FaultISR()  calls "__asm("    BKPT #2");".  I then enabled the COP watchdog, which is configured to make the MCU reset.  That formed a reset loop, which is what I wanted to know (that the watchdog would work after BKPT).  Unfortunately, I can no longer get my (ICDI) debugger to connect so I can change the program which is loaded.  I can see that it resets over and over from the UART output.  I can connect a different (identical) PCB and connect to it.  But it seems like the reset loop I set up prevents connecting with the CCS debugger (or UniFlash).  Do I have any options other than replacing the MCU?

Thanks for any suggestions.

Steve

P.S.  I thought that holding the reset line low might help, but that prevents the debugger from connecting even on a PCB which works fine otherwise.

(1) - https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1099079/sw-tm4c-simplified-method-for-determining-why-a-program-ends-up-in-faultisr/4072210#4072210 

  • Hi Steve,

      What debug probe do you have? If you are using ICDI as you have stated you can use LM flash programmer, see section 5.3 of the below app note to unlock MCU to its factory setting.  If you have a debug probe such as XDS100 or XDS200 then refer to section 5.3.2  to see if you can unlock the MCU to its factory setting. 

    https://www.ti.com/lit/pdf/spma075

  • The debugger is a custom design (form factor, interface pinout, etc.) which uses the debug interface of an embedded TM4C123 LaunchPad.  So, unless I am mistaken, it is essentially the same as an XDS100.

    It hasn't been tested yet (I just recently got the prototypes) but the PCB also has the land pattern for a 20-pin Cortex+ETM header.  I intend to get a XDS110 to use on the half of it which comprises the standard Cortex debug connector.  The half with trace signals may never get used as I hope to avoid spending for debug hardware with trace, but that may change if I run into a really bad bug Slight smile

    I'll take a look at SPMA075 and let you know yow it goes.  Thanks for the pointer.

  • The method from 5.3.1 using LM Flash Programmer worked great.  I had to modify my debugger to make it possible to disconnect power to the target without powering down the debugger, but after that it was straightforward.  Thanks a bunch for your help.