Failure with Olimex USB and Phytec LPC3180

I just brought an Olimex USB OCD and a Phytec LPC3180 board.

Using Linux 2.6.22 host

ftdi_sio is loaded

openocd built from svn today

I can’t figure out how to talk to the board.

Board prints 44444 to the serial port when powered on.

LED2 is red, LED3 is green

Info:    openocd.c:92 main(): Open On-Chip Debugger (2007-07-15 13:15 CEST)
Debug:   arm926ejs.c:700 arm926ejs_target_command(): chain_pos: 1, variant: (null)
Info:    configuration.c:50 configuration_output_handler(): Command etm not found
Info:    configuration.c:50 configuration_output_handler(): Command etb not found
Debug:   jtag.c:1407 jtag_init(): -
Debug:   ft2232.c:1420 ft2232_init_libftdi(): 'ft2232' interface using libftdi with 'olimex-jtag' layout (15ba:0003)
Debug:   ft2232.c:1462 ft2232_init_libftdi(): current latency timer: 2
I added 0x here to get past the spam filter.
Debug:   ft2232.c:1729 olimex_jtag_init(): 0x80 0x08 0x1b
Debug:   ft2232.c:1772 olimex_jtag_init(): 0x82 0x09 0x0f
Debug:   ft2232.c:252 ft2232_speed(): 0x86 0x14 0x00
Debug:   jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted
Debug:   jtag.c:1197 jtag_reset_callback(): -
Debug:   jtag.c:1197 jtag_reset_callback(): -
Debug:   ft2232.c:1200 ft2232_execute_queue(): statemove: 0
Debug:   jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted
Debug:   jtag.c:1197 jtag_reset_callback(): -
Debug:   jtag.c:1197 jtag_reset_callback(): -
Debug:   jtag.c:1028 jtag_build_buffer(): fields[0].out_value: 0x000000ff000000ff
Debug:   ft2232.c:1258 ft2232_execute_queue(): DR scan, 640 bit, end in 0
Debug:   jtag.c:1063 jtag_read_buffer(): fields[0].in_value: 0xffffffffffffffff
Error:   jtag.c:1253 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc.
#location
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG"
ft2232_layout olimex-jtag
ft2232_vid_pid 0x15ba 0x0003
#ft2232_device_desc "Amontec JTAGkey"
#ft2232_serial AMTJKV31
#ft2232_serial T1P3S2W8
#ft2232_layout jtagkey
#ft2232_vid_pid 0x0403 0xcff8
jtag_speed 20
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
jtag_device 4 0x1 0xf 0xe

jtag_nsrst_delay 200
jtag_ntrst_delay 200

#target configuration
daemon_startup attach
#target <type> <endianess> <reset mode>
target arm926ejs little reset_halt 1
#arm7_9 etm <target>
arm7_9 etm 0
#arm7_9 etb <target> <chain_pos>
arm7_9 etb 0 0

#target_script 0 reset csb337_init.script
#working_area 0 0x20000000 0x4000 nobackup

#flash configuration
#flash bank <driver> <base> <size> <chip_width> <bus_width> [driver_options ...]

#nand configuration
#nand device <controller> [controller specific arguments]
nand device lpc3180 0 13000

Updated to svn changes overnight, I get a new error now.

jonsmirl@jonsmirl:/extra/openocd/trunk$ openocd -d 3

Info: openocd.c:92 main(): Open On-Chip Debugger (2007-07-25 12:00 CEST)

Debug: arm926ejs.c:700 arm926ejs_target_command(): chain_pos: 1, variant: (null)

Info: configuration.c:50 configuration_output_handler(): Command etm not found

Info: configuration.c:50 configuration_output_handler(): Command etb not found

Debug: jtag.c:1407 jtag_init(): -

Debug: ft2232.c:1421 ft2232_init_libftdi(): ‘ft2232’ interface using libftdi with ‘olimex-jtag’ layout (15ba:0003)

Debug: ft2232.c:1463 ft2232_init_libftdi(): current latency timer: 2

Debug: ft2232.c:1730 olimex_jtag_init(): 0x80 0x08 0x1b

Debug: ft2232.c:1773 olimex_jtag_init(): 0x82 0x09 0x0f

Debug: ft2232.c:253 ft2232_speed(): 0x86 0xfd 0x01

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

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

Hi,

the latest SVN change just adds multiple retries to the chain validation, and moves the IDCODE examination past the validation.

This needs some more work, because now the verbose error reports don’t get output anymore.

I’m using exactly the same settings on a phytec LPC3180 here and everything’s working just fine.

You could try further decreasing the JTAG speed. Do you have another board to test the ARM-USB-OCD with?

Regards,

Dominic

I’ve got a LogicPD MX31 board with a JTAG connector. What will happen if I plug it into an ARM11?

Plugging into ARM11 gives a different error code. I used same config file from LPC3180. Are there any magic jumper that need to be set up Phytec board? Mine are all in default position from the manual.

jonsmirl@jonsmirl:/extra/openocd/trunk$ openocd -d 3

Info: openocd.c:92 main(): Open On-Chip Debugger (2007-07-25 12:00 CEST)

Debug: arm926ejs.c:700 arm926ejs_target_command(): chain_pos: 1, variant: (null)

Info: configuration.c:50 configuration_output_handler(): Command etm not found

Info: configuration.c:50 configuration_output_handler(): Command etb not found

Debug: jtag.c:1407 jtag_init(): -

Debug: ft2232.c:1421 ft2232_init_libftdi(): ‘ft2232’ interface using libftdi with ‘olimex-jtag’ layout (15ba:0003)

Debug: ft2232.c:1463 ft2232_init_libftdi(): current latency timer: 2

Debug: ft2232.c:1730 olimex_jtag_init(): 0x80 0x08 0x1b

Debug: ft2232.c:1773 olimex_jtag_init(): 0x82 0x09 0x0f

Debug: ft2232.c:253 ft2232_speed(): 0x86 0xfd 0x01

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

Debug: jtag.c:295 jtag_call_event_callbacks(): jtag event: TRST asserted

Debug: jtag.c:1197 jtag_reset_callback(): -

Debug: jtag.c:1197 jtag_reset_callback(): -

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

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

Are the missing etm etb commands important? Maybe I didn’t build openocd correctly.

It’s not the JTAG. I bought a ARM-USB-TINY and it is failing in the exactly same way. So it’s either something in how I have OpenOCD configured or my target board is bad. Target boat is putting out a boot prompt so it would have to be something wrong with only the JTAG hardware.

Hi,

could you try configuring OpenOCD with FTD2XX instead of libftdi?

Try removing ftdi_sio - this isn’t needed unless you want to use the serial port available on the ARM-USB-OCD.

Regards,

Dominic

We decided to switch to the MPC5200B, a PowerPC chip. If LPC3180 had I2S we would have kept it. I sent the LPC3180 board and the Olimex JTAG back to Phytec and they said they would take a look at it.

I tried FTD2XX and libftdi. I also booted Windows and tried from there. Same result everywhere. I don’t have a scope so I can’t look and see what is wrong. I tried both JTAG connectors, carrier board and CPU board. My guess is that something was wrong with JTAG port (rest of board was working) or something has changed in the way the JTAG reset is handled.

During the eval process NXP told me that LPC3180 is a PNX4008 with some of the peripherals removed. PNX4008 is supported in the mainstream Linux kernel. I had already sent the board back when I found this out. If someone tries the PNX4008 kernel on the board and it works, please let me know.

Hi All,

I am having the exact same symptoms as jonsmirl reported over a month ago. I have not determined yet if my issue is hardware or software related but here is what I know:

  1. I am using the latest OpenOCD SVN revision as of sept 12 (revision 206).

  2. I have tried both the libftdi and ftd2xx drivers with the same results.

  3. My processor is an LPC3180 on the Phytec board.

  4. I am using the Olimex ARM-USB-OCD

  5. I am using the same configuration file as jonsmirl reported earlier, and getting the exact same debug output.

  6. The Olimex does seem to be controlling nTRST. The line is initally pulled down to 0.87V. When I run openocd, it jumps to 2.9V briefly then back to 0.87V. Since nTRST is negative logic, it looks like the Olimex JTAG product is holding the JTAG chain in reset most of the time, then going out of reset for a couple of seconds and then back. I have not been able to find specs yet on whether .87V is low enough, but with 5V ttl levels 0.87V would be out of spec. I suspect I am not resetting the device, but this same board/JTAG product combo seems to be working fine for others. I was guessing there were actually two negative pulses as the software reports it is trying twice, but when I put it on a capturing oscope, I just see one long positive pulse. I have added a small pull down resistor to bring nTRST down to 0.7V without any change.

  7. I get no signal at all on the TCK line.

8 ) My processor board works great using another JTAG product I own. I would just like to be able to do my development in Linux.

Any ideas on where I should go from here? This all looks like faulty hardware to me, but I am not sure what the initialization sequence is supposed to look like.

Thanks for any pointers!

Cheers,

James Pellow

Hi All again,

I notice I only implied, but did not state that I am doing this all under Linux.

Ubuntu 7.04

uname -r: 2.6.20-16-lowlatency

ADM Opteron 165.

32 bit mode.

Thanks again for your input.

Cheers,

James Pellow

I have been talking to Phytec support and they have been talking to Olimex but nothing is resolved yet. It is confirmed that there is problem with reset.

If you put your scope on the working JTAG, how does it compare to the Olimex one?

The Olimex device can generate several different kinds of reset, maybe it hasn’t been set up correctly for the LPC3180.

I definitely get a solid reset signal using my alternate JTAG device. Vol on nTRST is around ~0.1V.

Thanks for your reply!

Cheers,

James