OpenOCD + ARM-USB-OCD + LPC-P2378-STK Not working

Hi all,

bear with me, this is my first attempt with the open source toolchain AND with the LPC-2378-STK development board. So sorry if I ask stupid questions or do stupid obvious things. :roll:

I get this error when I try to program the chip:

Info:    openocd.c:93 main(): Open On-Chip Debugger (2007-09-05 09:00 CEST)
Error:   jtag.c:1253 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc.
Error:   jtag.c:1440 jtag_init(): trying to validate configured JTAG chain anyway...
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1346 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x3f
Error:   jtag.c:1448 jtag_init(): Could not validate JTAG chain, exit

First of all I noticed that when I set the PWR_SEL on the board to 2 the two red leds are no longer burning. When I set PWR_SEL to 1 they are. Is there something wrong with my hardware? Do I need to change the jumpers on the ARM-USB-OCD ? I think not but I am in doubt.

This is my config file:

#daemon configuration
telnet_port 4444
gdb_port 3333

#commands specific to the Amontec JTAGKey
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 2
jtag_nsrst_delay 200
jtag_ntrst_delay 200

#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 <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30

working_area 0 0x40000000 0x4000 nobackup

flash bank lpc2000 0x0 0x80000 0 0 0 lpc2000_v2 0 12000 calc_checksum

# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger

Any idea what I might be doing wrong?

kind regards,

Jef

You should try reducing the JTAG frequency by using a higher jtag_speed settings (it’s a divisor, frequency is 6MHz / (1 + jtag_speed)). The LPC2378 comes up running from its internal oscillator at only a few MHz, and the JTAG clock has to be less than 1/6th of that.

Regards,

Dominic

Thanks for the reply Dominic, I tried several settings (10, 20, 50, 100 and 200) it does not make a difference. I keep on getting the same error. Any other ideas?

Is there another way to examine the chain, with another tool maybe? So I can get a clearer description of what might be wrong?

regards,

Jef

Try PWR_SEL position 3 (+5V_USB) and plug in the LPC-2378-STK’s USB connector to a powered USB hub.

OR

Try PWR_SEL position 1 (EXT_PWR) and use a “wall wart” power supply capable of supplying enough power instead of the ARM-USB-OCD’s power supply.