JTAG Connection Issues

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

JTAG Connection Issues

1,064 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by birdbren on Tue Jun 10 06:59:08 MST 2014
We have a prototype development board using the NCP4357 (the 208 pin QFP version) and I have been trying to get it up an running for a week now. The problem is that I can't even get a JTAG to connect properly. It is partially working, since I can see both the M4 and M0 processor ID's on the JTAG chain when I configure the JTAG but as soon as I try to connect, I get errors. Usually the error is that the processor could not be Halted, but someimes it is "Too many devices in the scan chain"

I have tried using both KEIL and their Ulink-ME and the LPC-LINK2 with LPCXpresso as well as a FTDI based Jtag using OpenOCD and they all have similar responses.

Getting details from Keil or LPCXpresso on the JTAG responses is difficult but from OpenOCD I can get a bit more information, and I have been checking the JTAG signals on a scope to confirm. What seesm to be happening is that the JTAG resets properly and starts shifting the Device ID, during this time the JTAG TDI  pin (the input to the JTAG Scan Chain on the 4357) goes High (after the reset and before the data shift starts), the device ID appears on the JTAG TDO pin, but after the 2 32 bit ID's, the TDO pin stays low, even though there are another 14 to 30 registers worth of clocks.

My understanding is that after the 2 Device ID's (64 clocks) the data that I get on TDO should be what was on TDI 64 clocks ago, so I should be getting a stream of 1's after the second device ID, not 0's.

We did check that the DBGEN pin is configured properly to enable the JTAG (changing it gets a different device ID, only 1 32 bit value, but still followed by 0's.

It looks as if the TDI pin is not working - we are currently building up a board with only the CPU and JTAG but I was hoping you may be able to find someone to help.
Labels (1)
0 Kudos
2 Replies

687 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Wed Jun 11 22:01:05 MST 2014

You can find several FAQs on this site regarding debug signals and circuits. Here's one:

http://www.lpcware.com/content/faq/lpcxpresso/debug-design

LessThanZero
0 Kudos

687 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Wed Jun 11 15:00:34 MST 2014
I've built a LPC4337 circuit on a breadboard; works fine with JTAG-lock-pick Tiny 2 and OpenOCD 0.9.0 (current HEAD from the git repository).

In order to program the internal flash memory, I recommend not connecting P2[7]; let it float.
I'll be happy to share my config files with you; they're still in the draft state, but I've used them for a few months now, and they appear to work quite alright.

Another thing: Do not attempt to use OpenOCD 0.7.0. Use at least v0.8.0, which has internal support for LPC43xx.

I recommend you subscribe to the openocd_dev list and ask for help there, if you can't get OpenOCD to work. The OpenOCD developers will be reading this list, and I'm also subscribed, so I might be able to answer some of your questions.

For starters, I've attached my personal JTAG documentation. ;)
-It's just how I wire up the connections on the 20-pin IDC connector, and what resistors I use.
Save the PDF and keep it for future reference.
Check your connections; it may be something as silly as a missing pull-up, pull-down or even a GND or VCC connection (!) -I've been there many times.

I let DBACK and DBGRQ float. Never had any issues, but I'm only flash-programming it, so if you're doing some real-time debugging, I don't know if it'll work; I never use any such debugger; I only flash-program the microcontrollers...

0 Kudos