LPC2148 JTAG not working with OPENOCD

Hi

I am trying to get the JTAG working with my LPC2148 chip. I have all the relevant JTAG pins connected like the Olimex LPC-E2294 dev board. I am using the Amontec JTAGKey. I get the following error when I try to connect to arm-elf-insight:

ERROR: jtag.c 1096: jtag_validate_chain(); Error validating JTAG scan chain, IR mismatch

This is my config file code:

#daemon configuration

telnet_port 4444

gdb_port 3333

#interface

interface ftd2xx

ftd2xx_device_desc “Amontec JTAGkey A”

ftd2xx_layout jtagkey

ftd2xx_vid_pid 0x0403 0xcff8

jtag_speed 4

#use combined on interfaces or targets that can’t set TRST/SRST separately

reset_config trst_and_srst srst_pulls_trst

#jtag scan chain

#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 4 0x1 0xf 0xe

#target configuration

daemon_startup reset

#target

#target arm7tdmi

target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4

run_and_halt_time 0 30

#flash configuration

#flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum

For more information about the configuration files, take a look at:

http://openfacts.berlios.de/index-en.ph … p+Debugger

Can anyone please help as it’s driving me nuts!:slight_smile:

Please upgrade to the latest version of the OpenOCD available from SVN. It contains additional debug statements that print out the values captured while checking the scan chain. A failed scan chain validation means that some very basic JTAG operations that only use TCK, TMS, TDI and TDO (but none of the reset lines) have failed.

Regards,

Dominic

Hi Domenic!

Can you please give me the website for this as I have a feeling I have already done this!

Hi Dominic!

Also…i got my version from the Amontech website…i guess this is the old version?

Unfortunately the latest sdk4arm dates back to july 31st, but I’ve added the additional debug output sometime last week, iirc.

You’d have to compile this yourself, after getting the sources from SVN. See http://openfacts.berlios.de/index-en.ph … ng_OpenOCD for more information.

I guess this is a board you’ve designed yourself?

Are you able to connect to your board using the Philips Flash utility?

What resistors do you use as pull-up/downs on the JTAG and reset lines?

Regards,

Dominic

Hi Dominic!

Yes this is a board that I have made myself!

I found the r82 version of openocd…and now i have found that the problem is somewhere on my board!

When i use a CRO lead or even a multimeter lead and touch the Rx pin for the RS232 (pins 34 and 21), the LED output turns on and off intermittently on pin 58 of my LPC2148 chip!

So after poking around the board for a while i must’ve done something and openocd-fdt2xx -f lpc2xxx_jtagkey.cfg worked!

I have used 10k pullups and pulldowns on the following pins:

TRST - 10k pullup

TDI - 10k pullup

TMS - 10k pullup

TCK - 10k pulldown

RTCK - 10k pulldown

TDO - 10k pullup

RST - connected to RESET pin of ARM chip which has a 10k pullup

Hi Domenic

I have just loaded another board which is fine…does the power have to be recycled on the Amontec JTAGKey for it to work?

I get the same error jtag_validate_chain():…

but sometimes when i recyle the power it ends up working with no errors?

Hi!

My Amontech JTAGKey works after i measure the voltage with a multimeter between the RST and TDO pin…anytime before this I get that jtag_validate_chain(): mismatch error!

Is there a handshaking problem?

Hi Seema,

Please make sure to provide a regulated VREF (from 1.4V to 5V) on the pin 1 of the 20-pin ARM header. In fact, the actual JTAGkey emulator use the VREF to power the on-board IO interface.

NOTE: Amontec is working on a JTAGkey without charging VREF. This will be great for debugging in real Embedded applications (on BAT !)

Regards,

Laurent

http://www.amontec.com