JTAG scan chain newbie - five LPC2000s, two Lattice CPLDs

Hi all… heck, the two of us have been struggling with this all day. I hope someone with a bit more knowledge can please lend us a hand…

We’re using an Olimex ARM-USB-OCD

Arrangement

TDI =>

LPC2136 =>

LPC2103 =>

LPC2103 =>

LPC2103 =>

LPC2136 =>

ISP4032 (Lattice CPLD) =>

ISP4064 (ditto) =>

=> TDO

We’ve been using Rowley Crossworks to try and address one of the ARM devices but without any success.

So, I swapped over to using OpenOCD which I’d got working earlier with just a single device.

This is the subset from the OpenOCD .cfg

jtag_device 8 0x1 0x00 0xe

jtag_device 8 0x1 0x00 0xe

jtag_device 4 0x1 0xf 0xe

jtag_device 4 0x1 0xf 0xe

jtag_device 4 0x1 0xf 0xe

jtag_device 4 0x1 0xf 0xe

jtag_device 4 0x1 0xf 0xe

And the result:

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0x11804043 (Manufacturer: 0x021, Part: 0x1804, Version: 0x1)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0x1180c043 (Manufacturer: 0x021, Part: 0x180c, Version: 0x1)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Info: jtag.c:1304 jtag_examine_chain(): JTAG device found: 0xffffffff (Manufacturer: 0x7ff, Part: 0xffff, Version: 0xf)

Error: jtag.c:1314 jtag_examine_chain(): number of discovered devices in JTAG chain (20) doesn’t match configuration (7)

Error: jtag.c:1315 jtag_examine_chain(): check the config file and ensure proper JTAG communication (connections, speed, …)

Error: jtag.c:1460 jtag_init(): trying to validate configured JTAG chain anyway…

Error: jtag.c:1359 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3fffff1919

Error: jtag.c:1359 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3fffff1919

Error: jtag.c:1359 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3fffff1919

Error: jtag.c:1359 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3fffff1919

Error: jtag.c:1359 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3fffff1919

Error: jtag.c:1359 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3fffff1919

Error: jtag.c:1468 jtag_init(): Could not validate JTAG chain, exit

To note, the first two devices being read out (the two CPLDs furthest from TDI) appear to be reading their IDs corectly, 0x11804043 and 0x1180c043 (we’ve verified those IDs are correct from the Lattice programming tool so we know that some data is being read correctly).

It all just goes to hell in a hand-bag from there.

In Rowley Crossworks we’ve set the “JTAG Data Bits Before” to 36, and “JTAG Instruction Bits Before” to 6. This is in an attempt to address the first LPC2136 in the chain. We’ve all tried changing these to Bits After in the chance we got that the wrong way around.

The CPLDs are 8 bits, the ARM7’s are 4 bits.

Is there some fatal flaw in methodology here? I’ve never used anything in a JTAG scan chain before so this is all very new to me.

Thanks All

Darcy

Your JTAG chain is broken between

LPC2136 =>

ISP4032 (Lattice CPLD) =>

Please verify the TCK TMS TDO TDI signal connections.

Regards,

Laurent

http://www.amontec.com

Note: using Amontec JTAGkey you could have much more support from Amontec Team. Also, Amontec provides a very optimized SVF player for the JTAGkey. This will help to charge your Lattice from SVF generated by Lattice ISPLever.

Hi, thanks for your insight. We are checking this out right now.

To be honest, we looked at the Amontec units, but there do not appear to be any suppliers in New Zealand. If you could recommend a supplier down here we’d happily pick up an Amontec programmer as this would allow us to program both the CPLDs and LPCs with the same device.

A question from our H/W engineer, is the JTAGkey based on the FT2232 or something else all-together?

Regards

Darcy

Sorry, we do not have vendor close to you in New Zeeland.

Yes, our JTAGkey is based FT2232, but we have optimized the low level software to program PLD CPLD and FPGA. Also, we are close to the speed of a Xilinx USB programmer and much better than Altera or Lattice programming speed :wink:

We will come very soon with our new product : the Amontec JTAGkey-Pro version. And with this one, we will reach the JTAG speed never reached before! about 20x faster than the JTAGkey! Not full-speed as the TJAGkey, but based on Hi-Speed USB 2.0 + on-board our Amontec JTAG Stream core and our Amontec JTAG Accelerator core .

Maybe wait until our JTAGkey-Pro will be released!

Regards,

Laurent

http://www.amontec.com

Okay, that sounds like a plan :slight_smile:

Thanks again for your help. I slapped the H/W engineer from here to Sunday… We found about three issues with the h/w design in the process of tracking that issue down.

We’ve got JTAG comms with all of the devices now using Rowley CW. Sweet