openocd unable to open ftdi device error on Windows ...HELP

Hello I am stuck trying to get openocd to startup with my amontec jtagkey. I suspect this is a very simple initialization error somehow.

IF anyone see something wrong with my cinfig stuff let me know

I do have the amontec jtagkey demo program working and recognizing the target via the same usb.

Then when I do … openocd-r657 -f pxa270.cfg

I get an error like

error: ft2232.c:1413 ft2232_init_ftd2xx(): Unable to open ftdi device : 2

error: ft2232.c:1430 ft2232_init_ftd2xx(): 0 Amontec Jtagkey A

error: ft2232.c:1430 ft2232_init_ftd2xx(): 1 Amontec Jtagkey B

----- my pxa270.cfg file looks like this

telnet_port 3333

gdb_port 4444

interface ft2232

ft2232_layout jtagkey

ft2232_vid_pid 0x0403 0xCff8

ft2232_device_desc “Amontec OpenOCD jtagkey”

jtag_speed 0

#note tried with speed 1 and 5 no difference

jtag_nsrst_delay 250

jtag_ntrst_delay 250

reset_config trst_and_srst separate

jtag_device 7 0x1 0x7f 0x7e

daemon_startup reset

target xscale little reset_halt 0 pxa27x

working_area 0 0xa0000000 0x10000 nobackup

run_and_halt_time 0 30

target_script 0 reset c:\openocd-r657\bin\pxa270flash.ocd

flash bank cfi 0×00000000 0×2000000 2 4 0

----- my pxa270flash.ocd file looks like this

wait_halt

armv4_5 core_state arm

flash write 0 uboot.bin 0x0

mww 0xfffffd08 0xa5000401

reset

shutdown

To make it still clearer for anyone which may have an idea at

At http://bec-systems.com/web/content/view/74/9/

I found …

If you get the following message: Error: ft2232.c:1338 ft2232_init_ftd2xx(): unable to open ftdi device: 2, there is a permissions problem with the USB device. To get around this, run openocd using sudo, or add the appropriate rules to udev to allow the usb device to be used by any user.

But this isn’t my problem since I am on a Windows XP machine NOT Linux

and I can use the very same machine with a jtagdemo.exe using the same

usb drivers.

Hmmmmm I suspect an initialization gotcha in the openocd code?

But what is it?

So somebody HELP …

Hello Ron,

if you use a Amontec JTAGkey you should use the interface like:

interface ft2232

ft2232_device_desc “Amontec JTAGkey A”

ft2232_layout jtagkey

ft2232_vid_pid 0x0403 0xcff8

In your case you use a wrong desc.

Regards,

Michael

First Thanks to Micheal!

Changing to …

ft2232_device_desc “Amontec JTAGkey A”

fixed my first problem here

unfortunately I am now getting a second error as follows …

jtag.c:1338 jtag_examine chain<>: JTAG communication failure check connection, jtag interface, target popwer etc …

then it goes on to try validating many times and fails

Since I have used the jtagdemo.exe from amontec successfully and since

I have actually succeeded to flash and run the target with a parallel flashing device via the tag interface I believe the target is fine.

FYI I am connected to a new DELL inspiron 1720 so one would hope they have the USB power pretty good. I know I have used several USB flash and a usb mouse and they work fine.

I have read about picky power issues with jtagkey maybe and the suggestion of getting a powered usb hub? Could that be it?

Any other ideas for what this communication failure problem could be?

:frowning:

Before starting the openocd server, please verify the green LED of the Amontec JTAGkey is ON (power LED)and the Orange LED is OFF (srst LED).

Note the orange LED give you the level status of the SRST signal.

OFF <=> ‘0’ → nSRST active

ON <=> ‘1’ → nSRST inactive

Please try to decrease jtag_speed 15

Let me know if it help.

If not, you certainly still have issue with the SRST TRST sequence.

Regards,

Laurent

http://www.amontec.com

Laurent I have a jtagtiny so I can only see pseudo leds via the jtagdemo

amontec provides. The pseudo lights appear correct there.

Is there any jtagdemo settings and testing that might prove the problem?

I am using jtag speed of 15 now and also

jtag_nsrst_delay 250

jtag_ntrst_delay 250

I also have tried both of these …

  1. reset_config trst_and_srst separate

  2. reset_config trst_and_srst

But nothing so far changes from communication failure.

Laurent or anyone what other .cfg setting changes should I try?

Please launch the Amontec JTAG Demo Software

  1. Select one Amontec JTAGkey A

  2. Uncheck “Internal Loopback Enable”

  3. click on DR SCAN

  4. Let me know what do you get as TDO (32bits)


  1. In Instruction Register Scan, Write “FF FF FF FF” in TDI filed

  2. IR SCAN

  3. What do you get as TDO (32bits)

Please let me know the 4. and 7. using the Amontec JTAG Demo Software.

Laurent

http://www.amontec.com

I went into the jtagkey_demo after I had run the openocd in a command prompt window and communication failed and come back to the command line prompt > . The jtagkey_demo could not then find a jtagkey to open/connect to. I apparently must close the command prompt window before he jtagkey is available to another process? I will make sure I close and reenter a new window after each run of openocd.

Anyway this isn’t my problem, just an interesting edge here.

Yes, that’s normal.

We make sure that only one software handle an open Amontec JTAGkey.

This is a secure method to avoid two software handling the same Amontec JTAGkey at the same time.

(wrong JTAG scan could be a bit dangerous for your board especially INTEST EXTEST !)

Laurent

Unchecked loopback did initialize … said initialize went OK

→ TDO result is saying 00 00 00 00 in both DR and IR scans.

For DR scan I left the TDI [hex] as the default of 00 00 00 00

For the IR scan I made TDI [hex] FF FF FF FF

Both scans memo said they checked successfully.


Hmmm did I do this right? What now?

FYI

I am working on getting a Eclipse-OpenOCD toolchain working

for phytec pxa270. I have reflashed to uboot using phytec’s provided

parallel wriggler and can see the serial output of reflased uboot via hyperterminal now/still.

I have two host machines one a older dell desktop with XP and Suse and a new Inspiron 1720 with Vista and Suse.

I figure I prove OpenOCD and jtagkey under windows and then do the same

under Suse. My final goal is a complete development setup under Suse

for Linux uboot-kernel use. I have older proven uboot and linux images for the phytec and now am also working on building new images from pengutronix latest releases.

BAD result from you with your

TDO result is saying 00 00 00 00 in both DR and IR scans.

You JTAG chain is broken !

  1. check that you have a strong GND Ground on pin 20 of the 20-pin Header of the Amontec JTAGkey . Very important.

  2. check that you have 3V3 on pin 1 of the 20-pin Header of the Amontec JTAGkey . Very important.

  3. please let me know your board schematic to laurent.gauch -AT- amontec.com

Laurent

http://www.amontec.com

Note with pior jtagkey_demo tests

TDO expected and for both DR and IR scans was 00 00 00 00

TDO mask was FF FF FF FF

Since both scans returned Memo text saying scan checked successfully

I assume TDO returned data was the TDO expected of 00 00 00 00

correct?

Should I try to reflash a different uboot image? I haven’t done anything

with jtag demo to hurt the board so I expect this will work like it did two days ago.

So I can prove I can still FLASH a uboot using phytec’s wriggler via the jtag port? Would that prove jtag port-chain is OK or mostly so?

I will check voltages on pins but I only have a meter no scope.

I will have to search for the schematic I know I found one somewhere

online in phytec.

Removing USB cable from jtagkey and then removing light plastic above pins 1 and 20 I find a 3V or 2.90V maybe between these two pins.

With USB connected I still see same 3volts

Now to started digging for that schematic … I had it once where is it?