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.

TM4C123GH6PZ: Jtag connection with Tiva MCU

Part Number: TM4C123GH6PZ

Hello,
Previously I asked a question about "unlock Jtag" with
Tiva MCU,that is,we tried to unlock jtag by using our custom board and
XDS100v2 but it failed.
And the answer is ,there is a possibility that
the Jtag circuit on the board or the debugger has some problem.

We use these seven pins (between Tiva and XDS100v2 connection):
1.VDD 2.TRST 3.TDI 4.TMS 5.TCK 6.TDO 7.GND
and the EMU0 and EMU1 pins on XDS100v2 are pulled up with 5.1kohm resistor.

I attaches the Jtag circuit figure on our custom board.
Could you point out if there is a problem or not ?

Regards,
Hiroyasu

  • Hi Hiroyasu-san,

      I'm not too clear with your JTAG interface. Can you show the full schematic of the JTAG interface. What is the 7-pin connector on the upper right? What type of JTAG connector are you using? 

      To rule out if this is a board problem or the debug probe problem, I will suggest you try some experiments. 

      - Can you try to connect/debug another custom board. Hope you have another board to do this experiment. This experiment will tell two things. If it works, then there is no issue with the XDS100 debug probe. It also tells that the board including the JTAG interface is good. If you cannot connect to this second board then it is possible there is some issue with the JTAG interface. As I'm not clear with your schematic, I cannot comment if your schematic is ok or not. 

      - Can you try to do a jtag unlock on the "known good" board? I just wanted to make sure you enter the correct command line to do the unlock. You can refer to section 5.3.2 in this app note https://www.ti.com/lit/pdf/spma075 on how to do it using command line. Basically, you need to type  dbgjtag.exe –f @xds100v2 –Y unlock,mode=tiva on a windows command line. 

  • Hello Charles Tsai,

    Thank you for your reply.

    I attaches the full schematic about the Jtag circuit on
    our custom board.
    We use 7-pin connector between custom board and XDS100v2
    14pin header.

    I could "unlock jtag" successfully with one of our another custom
    board,but the another one could not still be unlocked.
    These two boards made by the same schematic,but the program
    that is written into the flash rom of Tiva are different.

    I used the windows command line ,
    "dbgjtag.exe –f @xds100v2 –Y unlock,mode=tiva".
    The version of the dbgjtag is 6.0.83.1.

    Is there anything I can try for achieving the "unlock jtag"
    sequence ?

    Regards,
    Hiroyasu

  • Hi Hiroyasu-san,

    I could "unlock jtag" successfully with one of our another custom
    board,but the another one could not still be unlocked.
    These two boards made by the same schematic,but the program
    that is written into the flash rom of Tiva are different.

    If you can unlock successfully with another board then it proves that there is no issue with the debug probe and the JTAG interface connection is proper. 

    Is there anything I can try for achieving the "unlock jtag"
    sequence ?

    I don't know what program you have on the bad board. It may be possible that the program subject the MCU to some unrecoverable state. One example I can think of is that the device is put into some type of deep-sleep mode where all clocks are turned off without a means to wake up. When this happens, the debug probe cannot synchronize with MCU's internal clock. This is just a guess.

    This is what I will suggest. If you have another debug probe like XDS200, then you can try to see if you can unlock it. XDS200 or XDS560 are faster debug probes that may be able to connect to the device before the code start to misbehave. However, there is no guarantee that this will succeed. 

    If you have a LaunchPad, then you can use the LaunchPad's ICDI debug probe to debug and connect to your custom board. Again, there is no guarantee this will succeed.  Please refer to the section 4.6 of this app note on how to use the LaunchPad's ICDI to debug another board. https://www.ti.com/lit/pdf/spma075

    You can use the LM flash programmer to unlock the device with ICDI. 

    Lastly, if you still cannot unlock the device by any means, then I think you need to call it the day and move on. I will suggest in your code that during development you can use an input pin to force the device into a recoverable state where the debugger can connect and debug. Once you finish the development you can remove this temporary code. 

     

  • Hello Charies Tsai,

    Thank you for you reply.
    I would try to use ICDI with Launchpad.

    By the way,
    about you said "MCU to some unrecoverable state",
    I suspect that the program goes to some unrecoverable state
    when "unlock Jtag" because it includes the function of DFU
    (Device Firmware Upgrade via USB).

    The program uses two USB composite devices,the first one is
    CDC device ,and the second one is DFU device.

    Is there any possibility that the reason of couldn't unlock
    jtag is related to DFU ?

    Regards,
    Hiroyasu

  • Hi Hiroyasu-san,

    about you said "MCU to some unrecoverable state",
    I suspect that the program goes to some unrecoverable state
    when "unlock Jtag" because it includes the function of DFU
    (Device Firmware Upgrade via USB)

    I can't think of a reason why DFU application would render the MCU in an unrecoverable state in your custom board. However, I have seen a few times where a LaunchPad board become unrecoverable from JTAG connection when running a DFU application on the target MCU. Let me explain when does this happen and you can judge if this is applicable to you. 

    The LaunchPad board has both a target MCU as well as another TM4C MCU that acts as a on-board debug probe. The debug probe is called ICDI. The ICDI MCU runs a USB firmware that can be put into DFU mode too so the firmware can be updated. When the target MCU also runs a DFU USB application, user must be very cautious as there will be two MCUs in DFU mode. You must be very careful as to choosing the correct MCU for upgrading the firmware. I have seen people upgrading the firmware to the wrong MCU and render the ICDI MCU in a unrecoverable state. When the ICDI MCU is upgraded with a wrong program image, it is no longer a ICDI debug probe and this is the reason for not being able to connect to the target device anymore. With that said, I don't think this is the problem with you unless you have a on-board debug probe. My understanding is that you have an external XDS100 debug probe which is still working that you can use to connect and unlock another board. 

    See below example image where two DFU devices are detected. One MCU is the ICDI debug interface and another MCU is running a USB composite class supporting both HID mouse and DFU.    When upgrading firmware, be very careful in selecting the right MCU. 

      

  • Hello Charies Tsai,

    Thank you for your reply.

    In any case ,I would use ICDI for unlocking jtag.