Hi folks,
I’ve just recently received an Olimex USB JTAG TINY adapter, and I’m working to get it running with OpenOCD and an AT91RM9200 board of my own design. I’ve based my config file on others using the Olimex USB JTAG adapter and AT91RM9200 hardware, but have been getting an error (“Error: number of discovered devices in JTAG chain (20) doesn’t match configuration (1)”). After some quick googling, it looks like this error can happen when the JTAG speed isn’t set correctly (if it’s set too fast, I think). I’ve lowered the JTAG speed quite a bit, but still receive the same error. I’ve also tried the older OpenOCD that comes on the Olimex CD, as well as the most recent version I could find – both give the same error (‘number of discovered devices in JTAG chain (20) doesn’t match configuration’), although the newer version is much more verbose:
OpenOCD output:
jtag_speed: 20
Info: JTAG device found: 0xf828003f (Manufacturer: 0x01f, Part: 0x8280, Version: 0xf)
Info: JTAG device found: 0x00000003 (Manufacturer: 0x001, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Error: number of discovered devices in JTAG chain (20) doesn't match configuration (1)
Error: check the config file and ensure proper JTAG communication (connections, speed, ...)
Error: trying to validate configured JTAG chain anyway...
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Warning:no tcl port specified, using default port 6666
Info: JTAG device found: 0xf828003f (Manufacturer: 0x01f, Part: 0x8280, Version: 0xf)
Info: JTAG device found: 0x00000003 (Manufacturer: 0x001, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Info: JTAG device found: 0x0000007f (Manufacturer: 0x03f, Part: 0x0000, Version: 0x0)
Error: number of discovered devices in JTAG chain (20) doesn't match configuration (1)
Error: check the config file and ensure proper JTAG communication (connections, speed, ...)
Error: trying to validate configured JTAG chain anyway...
Error: invalid mode value encountered
Error: cpsr contains invalid mode value - communication failure
Runtime error, file "embedded:startup.tcl", line 242:
expected return code but got 'TARGET: target0 - Not halted'
In procedure 'ocd_process_reset' called at file "?", line 1
Runtime error, file "openocd.cfg", line 31:
In procedure 'script' called at file "command.c", line 445
openocd.cfg
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG TINY A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0004
jtag_speed 20
#use combined on interfaces or targets that can't set TRST/SRST separately
#reset_config trst_and_srst srst_pulls_trst
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_ntrst_delay 500
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm920t little 0 arm920t
working_area 0 0x20000000 0x200000 nobackup
#flash bank lpc2000 <base> <size> 0 0 <target#> <variant>
#flash bank cfi 0x00000000 0x800000 4 1 0
init
reset halt
Any thoughts?
Thanks for your help