Stability problems with Amontec JTAGKey+libftd2xx

Hello!

I have installed svn r121 with libftd2xx0.4.10. I use it with an lpc2292. This is how I installed openocd:

$ cd openocd
$ ./bootstrap
$ ./configure LDFLAGS=-L$FTDDIR --enable-ft2232_ftd2xx --with-ftd2xx=$FTDDIR
$ make clean all tags

The config I use is based on openocd/doc/configs/arm7_ft2232.cfg. The only modification is that I use run_and_init and increased jtag_speed to 200 (but changing this value dont make a difference):

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Amontec JTAGkey A"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0xcff8
jtag_speed 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
target_script 0 reset h2222_init.script
run_and_halt_time 0 30
#working_area 0 0x40000000 0x40000 nobackup

#flash configuration
flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum
flash bank cfi 0x80000000 0x200000 2 2 0

Then I issue following commands:

halt
mdh 0x80000000 0x200000

Then, after a while the deamon stops. With dmesg I can see that something nasty happened to the JTAGKey:

usb 2-2: reset full speed USB device using uhci_hcd and address 20
hub 2-0:1.0: port 2 disabled by hub (EMI?), re-enabling...
usb 2-2: USB disconnect, address 20
usb 2-2: new full speed USB device using uhci_hcd and address 21
usb 2-2: new device found, idVendor=0403, idProduct=cff8
usb 2-2: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-2: Product: Amontec JTAGkey
usb 2-2: Manufacturer: Amontec
usb 2-2: SerialNumber: 32P6NXSJ
usb 2-2: configuration #1 chosen from 1 choice

The last output from openocd is

Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 06 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.6738, inter2: 0.6738 end: 0.13861
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 16 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.5746, inter2: 0.5746 end: 0.13764
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 0e 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.5799, inter2: 0.5799 end: 0.16779
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 419):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 2e 02 fc ff 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 0b 02 20 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 20 28 03 00 6b 06 01 4b 06 30
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 05 4b 06 20 28 03 00 6b 06 01 4b 06 30 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 05 4b 06 20 28 03 00 6b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 28 03 00 6b 06 01 4b 06 30 4b 06 05
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 20 28 03 00 6b 06 01 4b 06 30 4b 06 05 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 20 28 03 00 6b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 28 03 00 6b 06 01 4b 06 30 4b 06 05 4b 06 20
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 28 03 00 6b 06 01 4b 06 30 4b 06 05 4b 06 20 28
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 03 00 6b 06 01 4b 06 30 4b 06 05 4b 06 20 28 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 6b 06 01 4b 06 30 4b 06 05 4b 06 20 28 03 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 6b 06 01 4b 06 30 4b 06 05 4b 06 20 28 03 00 6b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 30 4b 06 05 4b 06 20 28 03 00 6b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 01 4b 06 30 4b 06 05 4b 06 20 28 03 00 6b 06 01
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 30 4b 06 05 4b 06 20 19 03 00 0e 0b 02 20
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 01 4b 06 30 4b 06 05 4b 06 20 19 03 00 0f
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06 20 19
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 03 00 0e 16 10 9a 4b 06 01 4b 06 30 4b 06 05 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 1e 3b 02 a4 6b 06 31 4b 06 2b 3b 02 a2 6b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 31 4b 06 25 1b 02 a2 4b 06 31 4b 06 2b 3b 02 ac
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 6b 06 b1 4b 06 25 19 03 00 09 00 00 00 1b 04 01
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 31 4b 06 25 39 03 00 09 00 00 00 3b 04 04
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.38669, inter2: 0.38670 end: 0.49675
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 86 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 00 00 8c 4c 02 00 00 cc 5d 02 00 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 08 b8 01 00 00 08 08 00 00 00 5c cc 01 00 00 98
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 98 01 00 00 98 98 03 00 00 8c e9 01 00 00 18 b9
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 01 00 00 58 98 01 00 00 08 58 00 00 00 5c cc 01
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 98 98 01 00 00 98 98 03 20 00 20 00 20 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 08 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.6055, inter2: 0.6055 end: 0.13732
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 18 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.5820, inter2: 0.5820 end: 0.13816
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 04 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.5797, inter2: 0.5797 end: 0.13803
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 14 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.5812, inter2: 0.5813 end: 0.13815
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 0c 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.5801, inter2: 0.5801 end: 0.13806
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 1c 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.5815, inter2: 0.5816 end: 0.14819
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 02 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.6671, inter2: 0.6671 end: 0.14814
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 12 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Info:    ft2232.c:376 ft2232_send_and_recv(): inter: 0.5785, inter2: 0.5785 end: 0.13790
Debug:   ft2232.c:391 ft2232_send_and_recv(): read buffer (0 retries): 16 bytes
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 2f 00 20 cc 39 00 20 00 20 00 09 00 00 00 08 7c
Debug:   embeddedice.c:157 embeddedice_read_reg_w_check(): 1
Debug:   ft2232.c:336 ft2232_send_and_recv(): write buffer (size 152):
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 4b 06 2b 3b 02 a2 6b 06 17 4b 06 20 1b 02 a1 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 01 4b 06 1e 3b 02 ac 6b 06 97 4b 06 20 19 03
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 0e 0b 02 20 4b 06 01 4b 06 30 4b 06 05 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 20 19 03 00 0f 0b 02 20 4b 06 01 4b 06 30 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 05 4b 06 20 19 03 00 0e 16 0a 9a 4b 06 01 4b 06
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 30 4b 06 05 4b 06 1e 3b 02 a4 6b 06 31 4b 06 2b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 3b 02 a2 6b 06 31 4b 06 25 1b 02 a2 4b 06 31 4b
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 06 2b 3b 02 ac 6b 06 b1 4b 06 25 19 03 00 09 00
Debug:   ft2232.c:311 ft2232_debug_dump_buffer(): 00 00 1b 04 01 4b 06 31 4b 06 25 39 03 00 09 00
Debug:   ft2232.c:317 ft2232_debug_dump_buffer(): 00 00 3b 04 04 6b 06 31
Error:   ft2232.c:225 ft2232_read(): couldn't read the requested number of bytes from FT2232 device (8 < 16)
Error:   ft2232.c:365 ft2232_send_and_recv(): couldn't read from FT2232
rake aborted!
Command failed with status (255): [LD_LIBRARY_PATH=/m/l/embedded/uclinux/libf...]
/m/l/embedded/uclinux/Rakefile:119:in `dosh'
(See full trace by running task with --trace)
/m/l/embedded/uclinux>

Any ides what happens here?

This seems to be either a kernel driver problem or USB hardware problem.

usb 2-2: reset full speed USB device using uhci_hcd and address 20

hub 2-0:1.0: port 2 disabled by hub (EMI?), re-enabling…

usb 2-2: USB disconnect, address 20

Theese messages are mostly found in discussions about old versions of the kernel or hardware with special USB drivers.

What kind of system, kernel and hardware are you using ?

Regards,

Magnus

mlu:
This seems to be either a kernel driver problem or USB hardware problem.

Thanks for the response, Magnus!

usb 2-2: reset full speed USB device using uhci_hcd and address 20

hub 2-0:1.0: port 2 disabled by hub (EMI?), re-enabling…

usb 2-2: USB disconnect, address 20

Theese messages are mostly found in discussions about old versions of the kernel or hardware with special USB drivers.
I am not aware that I have anything very old or broken here.

[quite]

What kind of system, kernel and hardware are you using ?

[/quote]

  • Amontec JTAGKey. On the PCB is written v3.2 3506, that is manufactured in calendar week 35 of the year 2006.

  • Opensuse 10.1 with kernel 2.6.16.27-0.6-smp

  • Fujitsu-siemens Scenic W600 i865G with P4 z3.2GHz. The exact specifications are here

http://www.fujitsu-siemens.co.uk/rl/ser … cification

[/quote]

Hi

Nothing strange with the configuration.

Does this happen everytime, and at the same place?

Can you run openocd under a debugger and place a breakpoint at

ft2232.c:365, just before the program exits.

A backtrace from this point could be very helpful.

I am still a bit supicious about USB hardware, my system usually only misbehaves when connecting to many things to cheap USB hubs.

Regards,

Magnus

mlu:
Does this happen everytime, and at the same place?

Nope. It is pretty much random.

Can you run openocd under a debugger and place a breakpoint at

ft2232.c:365, just before the program exits.

A backtrace from this point could be very helpful.

For sure:
$ gdb --args openocd/src/openocd -f openocd/doc/configs/arm7_ft2232.cfg 2>&1
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) break ft2232.c:365
Breakpoint 1 at 0x8066539: file ft2232.c, line 365.
(gdb) run
Starting program: /m/l/embedded/uclinux/openocd/src/openocd -f openocd/doc/configs/arm7_ft2232.cfg
[Thread debugging using libthread_db enabled]
[New Thread -1210513744 (LWP 24873)]
Info:    openocd.c:84 main(): Open On-Chip Debugger (2006-11-22 14:00 CEST)
[New Thread -1210516576 (LWP 24876)]
Warning: arm7_9_common.c:683 arm7_9_assert_reset(): srst resets test logic, too
Info:    target.c:219 target_init_handler(): executing reset script 'h2222_init.script'
Info:    configuration.c:50 configuration_output_handler(): requesting target halt...
Warning: arm7_9_common.c:842 arm7_9_halt(): target was already halted
Info:    configuration.c:50 configuration_output_handler(): target already halted
Error:   ft2232.c:225 ft2232_read(): couldn't read the requested number of bytes from FT2232 device (0 < 86)
[Switching to Thread -1210513744 (LWP 24873)]

Breakpoint 1, ft2232_send_and_recv (first=0xb708d008, last=0x0) at ft2232.c:365
365                             ERROR("couldn't read from FT2232");
(gdb) bt
#0  ft2232_send_and_recv (first=0xb708d008, last=0x0) at ft2232.c:365
#1  0x080666ee in ft2232_execute_queue () at ft2232.c:1201
#2  0x0806169f in jtag_execute_queue () at jtag.c:1080
#3  0x08054ecf in arm7_9_execute_sys_speed (target=0x80856d0) at arm7_9_common.c:552
#4  0x0805586f in arm7_9_read_memory (target=0x80856d0, address=2147483648, size=2, count=2097152, buffer=0xb7214834 "") at arm7_9_common.c:1742
#5  0x0804d0ad in handle_md_command (cmd_ctx=0x8084070, cmd=0x80d2240 "mdh", args=0xbfd7d580, argc=2) at target.c:1455
#6  0x08068cd9 in command_run_line (context=0x8084070, line=0xbfd7d7ac "mdh 0x80000000 2097152") at command.c:355
#7  0x08068e51 in command_run_file (context=0x8084070, file=0x80d2ac0, mode=COMMAND_EXEC) at command.c:403
#8  0x0804c254 in target_init_handler (target=0x80856d0, event=TARGET_EVENT_HALTED, priv=0x8084070) at target.c:220
#9  0x0804aecc in target_call_event_callbacks (target=0x80856d0, event=TARGET_EVENT_HALTED) at target.c:447
#10 0x08055f8c in arm7_9_poll (target=0x80856d0) at arm7_9_common.c:632
#11 0x0804b2e3 in handle_target (priv=0x0) at target.c:1052
#12 0x0804af97 in target_call_timer_callbacks () at target.c:469
#13 0x080699ce in server_loop (command_context=0x8084070) at server.c:319
#14 0x080496d9 in main (argc=3, argv=0xbfd7ea34) at openocd.c:124
(gdb)

I am still a bit supicious about USB hardware, my system usually only misbehaves when connecting to many things to cheap USB hubs.

I'll probably purchase an external hub and a pci card. Maybe the problem will go away with one of them.

jw:

mlu:
I am still a bit supicious about USB hardware, my system usually only misbehaves when connecting to many things to cheap USB hubs.

I'll probably purchase an external hub and a pci card. Maybe the problem will go away with one of them.
Today the external usb hub (with its own power supply) arrived. This solved the problem.

Hi jw,

thanks for the problem description. I have the same problem with my jtag debugger (oocdlink.joernonline.de) :?

I will try a active usb hub.

Joern

Okay, i got a usb hub.

I my case a passive hub improved the stability of my debugger very much. I made a test with the serial interface. Without the hub and 115.2 KBaud the FT2232 only worked 30 seconds. Now with the hub it runs over an hour @ 1MBaud.

regards

Joern