Debugging JTAG Connectivity Problems
From Texas Instruments Embedded Processors Wiki
Strategy for debugging JTAG connectivity problems
- Check that you are using high quality cables for connections. For example, with USB 2.0 emulators, please use a cable which is certified for USB 2.0 High Speed operation. (Poor cable quality has resulted in a failure to connect, unstable connection, etc. )
- Determine whether the emulator is correctly setup in Windows (i.e. is the USB driver, etc. working) by checking in the Windows System Devices control panel. If this is not right, then you need to contact your emulator vendor to make sure the driver is installed properly. For XDS100, please check the XDS100 page.
- Determine whether your JTAG connection is working at the lowest level. See below for details on how to use DBGJTAG to confirm that the JTAG connection is good. (Or other 3rd party utility such as SDCONFIG) If this fails or has errors, then there are the problem is with the software communicating to the emulator. This could be because there is a hardware problem, the configuration in CCS is setup incorrectly, or the software is not installed correctly.
- Check your Code Composer Studio configuration and try to connect. If you are able to confirm that the low level connection is OK (i.e. scan chain test is OK), then there is no problem with the USB/Ethernet or CCS configuration. The problem is probably with the Code Composer Studio setup, service release or chip support package. Please check Troubleshooting CCS
Check your JTAG connection
- Check your schematic to see whether the JTAG header is correctly connected on the PCB. Details can be found on the JTAG_Connectors page.
- Is the voltage the same on all your JTAG pins?
- Does your emulator support the I/O voltages of your device? (You may want to contact your emulator vendor for details on XDS100, XDS510 or XDS560 products)
- Review the Emulation FAQ
Emulator not plugged in
- We will use Dbgjtag to do this test. Spectrum Digital users have a utility called "SDconfig" which can perform very similar functions.
- In this example, an emulator is not plugged into the computer. The emulation SW is unable to access the emulator.
- The option "-f brddat\ccbrd0.dat" selects the emulator currently configured in CCS setup.
- The option "-rv" attempts to reset the emulator
| C:\CCStudio_v3.3\cc\bin>dbgjtag -f brddat\ccbrd0.dat -rv
[Print the reset-command software log-file]----------------------------- This utility has selected an XDS560 class product. An error occurred while soft opening the controller.
[An error has occurred and this utility has aborted]-------------------- This error is generated by TI's USCIF driver. The value is '-250' (0xffffff06). The explanation is:
|
Detect the length of the scan chain
- We will use Dbgjtag to do this test
- In this example, we want to figure out the legnth of the JTAG scan chain. The result is that the JTAG instruction register legnth is 38 bits and that the bypass register length is 1 bit.
- The option "-S pathlength" asks the dbgjtag program to find the length of the JTAG path.
- You can check lengths here
| C:\CCStudio_v3.3\cc\bin>dbgjtag -f brddat\ccbrd0.dat -rv -S pathlength
[Print the reset-command software log-file]----------------------------- This utility has selected an XDS560 class product. [Print the reset-command hardware log-file]----------------------------- The scan-path will be reset by toggling the JTAG TRST signal. [Perform the standard path-length test on the JTAG IR and DR]----------- This path-length test uses blocks of 512 32-bit words. The test for the JTAG IR instruction path-length succeeded. The test for the JTAG DR bypass path-length succeeded. |
CCS v4
For CCS v4, you may want to issue the command as follows
"C:\Program Files\Texas Instruments\ccsv4\common\uscif\dbgjtag.exe" -f "C:\Program Files\Texas Instruments\ccsv4\DebugServer\bin\win32\BrdDat\ccBoard0.dat" -rv -S pathlength
- Change the path to the location appropriate to your installation.
How to debug whether the JTAG scan path is broken
- In this example, we want to figure whether the JTAG scan path is broken.
- The option "-S brokenpath" asks the dbgjtag program to check the JTAG scan chain for breaks.
| C:\CCStudio_v3.3\cc\bin>dbgjtag -f brddat\ccbrd0.dat -rv -S brokenpath
[Print the reset-command software log-file]----------------------------- This utility has selected an XDS560 class product. [Print the reset-command hardware log-file]----------------------------- The scan-path will be reset by toggling the JTAG TRST signal. [Perform the Broken Path scan-test on the JTAG IR]---------------------- This test will use blocks of 512 32-bit words. Do a test using 0xFFFFFFFF. The JTAG IR Broken Path scan-test has succeeded. [Perform the Broken Path scan-test on the JTAG DR]---------------------- This test will use blocks of 512 32-bit words. Do a test using 0xFFFFFFFF. The JTAG DR Broken Path scan-test has succeeded. |
- The first run shows that the test succeeded, so the scan chain is OK.
- You can make the test run repetitively if you choose the "-S brokenpath,repeat=12" option to make it run 12 times. if repeat=0, then the test will run forever.
| C:\CCStudio_v3.3\cc\bin>dbgjtag -f brddat\ccbrd0.dat -rv -S brokenpath
[Print the reset-command software log-file]----------------------------- This utility has selected an XDS560 class product. An error occurred while hard opening the controller. [An error has occurred and this utility has aborted]-------------------- This error is generated by TI's USCIF driver. The value is '-183' (0xffffff49). The explanation is: |
- In this example, you can see that the Dbgjtag software has detected that the scan chain is broken. In this case, the emulator is simply not connected to the taget, so it says that the cable is broken.
JTAG scan chain integrity test
- You can test the integrity of the JTAG scan chain.
- Use the "-S integrity" option
| C:\CCStudio_v3.3\cc\bin>dbgjtag -f brddat\ccbrd0.dat -rv -S integrity
[Print the reset-command software log-file]----------------------------- This utility has selected an XDS560 class product. [Print the reset-command hardware log-file]----------------------------- The scan-path will be reset by toggling the JTAG TRST signal. [Perform the Integrity scan-test on the JTAG IR]------------------------ This test will use blocks of 512 32-bit words. Do a test using 0xFFFFFFFF. The JTAG IR Integrity scan-test has succeeded. [Perform the Integrity scan-test on the JTAG DR]------------------------ This test will use blocks of 512 32-bit words. Do a test using 0xFFFFFFFF. The JTAG DR Integrity scan-test has succeeded. |
How can I find out more about emulator error messages?
- You can use dbgjtag to find out more about error messages.
- For example, if I want to find out about error # -121, I could follow the sample below.
| C:\CCStudio_v3.3\cc\bin>dbgjtag -E single,number=-121
[The explanation of the error number '-121']---------------------------- This error is generated by TI's USCIF driver. The value is '-121' (0xffffff87). The explanation is: |
CCS suddently says my target is disconnected, what does this mean?
See Emulation Connect/Disconnect for details on connect/disconnect.
General things to try
1) Update CCStudio v3.3 to the latest service release. Support for certain devices require CCStudio to be updated to the correct level.
2) DSK/EVM specfic files, such as GEL files used in CCSetup are not always provided by TI in the CCStudio updates and are generally not supplied by the emulator vendor. They are usually provided by the board manufacturer. These files also need to be installed and usually accompany the DSK/EVM on CD, labeled something like "EVM target content". Please check with your board manufacturer.
3) Install the latest emulator drivers for the revision of CCStudio that you are using. You can check the emulator 3rd party site for the latest drivers. As TI releases new devices and DSK/EVM target boards you will see driver updates that include these imports either in the service release, chip support package. Most of the time, a new emulator driver is not needed, just a new CCS import configuraiton file (.ccs).
4) Add GEL files to the emulator setup for each CPU if not defined. If you change emulators, having the GEL files specified in a CCStudio import can cause problems because of a mismatch in emulator and board maufactuerer. Unless the emulator vendor is the same vedor that built the target hardware, they are not usually included or defined with driver updates. You can also email your emulator provider for the imports if they are not present.
5) Check the voltage levels that your JTAG pod can handle and what the target I/O voltage is. There are some older products which cannot handle newer targets with 1.8V I/O as they were designed to operate with 3.3V and 5V targets.
ARM 9 Targets
- If you are using a target with an ARM9 processor, you should review the section on Adaptive Clocking.
Code Composer Studio
- You may want to see Troubleshooting CCS topic for more information.
- For CCS v3.3 issues related to emulation drivers and service releases, you may want to see the CCS_3.3#Third_Party_Emulation_Drivers topic.
Leave a Comment
Comments
Comments on Debugging JTAG Connectivity Problems
Sp li said ...
DanRinkes said ...
Sp,
You are likely better off posting questions like this to the Forums, rather than posting on the Wiki. They may get answered in either place. But the Wiki is not routinely monitored for questions like the forum is. The forums are here https://community.ti.com/forums/Default.aspx.
With that being said, it's hard to tell where your problem is coming from. I suspect that it's possibly a problem with the board, but problems with the board shouldn't cause a dbjtag crash.
Have you tried other boards with these systems? The way the scan length check works is that the emulator scans in a number of patterns of bits into TDI and waits for those bits to show up on TDO. I don't have a good explanation of what could cause dbjtag to crash. Hopefully, if you find the answer to this question, you will post your findings back to this page.
--DanRinkes 15:14, 15 July 2009 (CDT)


I followed the instruction, and everything was fine until "Detect the length of the scan chain" - dbgjtag is simply crashed.
What does it imply? Something wrong in JTAG or board side?
xdsprobe did the same thing, and it crashed too.
I have tested this on 2 windows xp pro and both had same symptom.
--Sp li 00:55, 8 July 2009 (CDT)