Wiggler and OpenOCD

I am having some problems using a wiggler clone that I built with openocd.

I just installed YAGARTO and Eclipse and I followed [this tutorial.

When I try to run openocd:

D:\Projekti\Eclipse\Workspace\LPC2148Test>openocd-pp -d 3 -f .\prj\lpc2xxx_pp.cfg

I get this:

Debug: jtag.c:1307 jtag_init():

Debug: parport.c:377 parport_init(): requesting privileges for parallel port 0x378…

Debug: parport.c:387 parport_init(): …privileges granted

Debug: parport.c:212 parport_reset(): trst: 0, srst: 0

Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1106 jtag_reset_callback():

Debug: jtag.c:258 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1106 jtag_reset_callback():

Error: jtag.c:1159 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc.

Does anyone know what the could be the problem?

Is it something with the hardware or software? (I checked the wiggler and I didn’t find any problems)](http://www.yagarto.de/howto/openocd/index.html)

Hello ???

it looks that this is a software problem. You have not

installed the giveio driver. Take a look at the page

again. Here you will find some information about

how to install it, install_giveio.

Michael

I have installed it. It was installed in the process of the installation as it is written in the tutorial for YAGARTO.

Well, I can try to install the driver again, but I don’t think that it will help.

Sorry I am on the wrong way.

What is your target?

If by target you mean uP it is LPC2148, and I also tried it with LPC2138 (Keil MCB2130).

Error: jtag.c:1159 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc.

It looks that the target is not responding.

Have you connect the RTCK line over a resistor to GND?

[This is the schematic to my LPC2148 board and I have it connected (there is a jumper, but I will check it if it is OK).

I also tried it with MCB2130 board from Keil and I got the same error. (I used the same project - LPC2148Test - on this board).

I should probably also say that this is the first time I tried to use a JTAG and that I don’t know if it works (I recently built it on a protoboard).](http://po.labs.googlepages.com/nart2148.jpg)

I built the JTAG wiggler from [this schematic. This is supposed to be the schematic that Dominic Rath used in his OpenOCD thesis.](http://www.fh-augsburg.de/~hhoegl/proj/openocd/img/wiggler.jpg)

I have take a look on the MCB2130 schematics,

here the jumper J9 JTAG must be closed to enable

the JTAG interface.

Can you point me to your schematic of your JTAG hardware?

Have you check the power and the level of the

reset lines, nTRST and nSRST?

nTRST and nSRST are both high (3.3V).

TDI and TMS are high, TCLK and TDO are low.

I also checked JTAG jumpers on both of my boards and they are both connected.

Do you have an oscilloscope to check

the signal if you start OpenOCD?

What is your jtag_speed setting?

Make it very slow, and use a high number, perhaps 10.

This is what I got when I measured all the signals with the oscilloscope:

TDI - starts with low and than it sends a signals openocd-pp is running

TMS - starts high and goes low while openocd-pp is running

TCLK - starts with low and than it sends a signals openocd-pp is running

TDO - always low

nSRST - always high

nTRST - always low

This was tested at jtag_speed=500.

Can you tell me what should each signal look like?

TDI, TMS and TCLK look like they work, but this is just output from the PC, but the output TDO from the LPC2148 doesn’t look like it reacts this signals.

Now I will measure signals on the MCB2130…

I get the same results on MCB2130.

I measured nTRST again and found out that it sends a short pulse.

Here are the signals that I measured:

  1. TDI

http://shrani.si/files/tdivgjp.png

  1. TMS

http://shrani.si/files/tmsvgjr.png

  1. TCLK

http://shrani.si/files/tclkvgjv.png

  1. nTRST

http://shrani.si/files/ntrstvgjz.png

The signals nSRST (high) and TDO (low) didn’t change.

djurodrljaca:
I measured nTRST again and found out that it sends a short pulse.

Here are the signals that I measured:

SNIP******

The signals nSRST (high) and TDO (low) didn’t change.

If your waveforms were taken at the chip pins then your nTRST signal is inverted from what it should be. The “n” in nTRST indicates that it is negative true logic, so your nTRST signal is actively holding the EmbeddedICE TAP controller in reset for all but the short pulse that your waveforms show. With the TAP controller in RESET there can be no signal out of TDO, so the JTAG link is completely dead. You need to invert the nTRST signal to produce a negative pulse instead of a positive pulse. Actually it would be better still to produce the negative pulse on nSRST and reset ARM, since nTRST only resets the TAP controller without reseting the ARM core.

–Dave

I think that there could be some software/configuration error, since you should be able to set the polarity within reset_config (at least that is how I understood it). So than I tried to use “reset_config trst_and_srst separate trst_open_drain srst_open_drain” but it still works the same as “reset_config trst_and_srst srst_pulls_trst”.

I also tired to set “parport_cable chameleon” instead of “parport_cable wiggler” which was used as default and than the nSRST signal goes low and high repeatingly. So it look like all the parts on my wiggler work and this is why I think the problem is with software/configuration.

The schematic you used has a bug, sorry about that. I never actually built that device, I just tried to draw a schematic that implements both reset lines, as most existing schematics only had one. On a real wiggler, the nTRST line isn’t inverted, i.e. the host sets the line low when it wants to initiate a reset, and high to keep it deasserted.

If you can compile the OpenOCD yourself, try adding this line to the list of cables in parport.c:

{ “wiggler_ntrst_inverted”, 0x80, 0x10, 0x02, 0x04, 0x08, 0x01, 0x11, 0x80, 0x80 },

This tells the OpenOCD that nTRST is inverted, too, and should fix the problems you’re seeing.

Regards,

Dominic

The options that set the reset lines open-drain or push-pull only affect devices were this is configurable like the Amontec JTAG Accelerator or the various FT2232 based devices (JTAGkey, ARM-USB-OCD, OOCDLink etc.).

The “chameleon” cable layout is only used when programming the Amontec Chameleon itself, i.e. when a new configuration should be loaded to the CPLD.

Regards,

Dominic