libftdi Archives

Subject: Re: ft2232_read() error: couldn't read enough bytes from FT2232 device (0 < 5)

From: Drasko DRASKOVIC <drasko.draskovic@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Cc: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>, Laurent Gauch <laurent.gauch@xxxxxxxxxxx>
Date: Tue, 29 Mar 2011 18:04:16 +0200
On Tue, Mar 29, 2011 at 5:11 PM, Uwe Bonnes
<bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>>>>>> "Drasko" == Drasko DRASKOVIC <drasko.draskovic@xxxxxxxxx> writes:
>
>    Drasko> Hi all, I am using libftdi 0.18 with OpenOCD, and when trying to
>    Drasko> load some longer file via Amontec USB dongle to my MIPS based
>    Drasko> board, I am getting errors like this :
>
> Is behaviour different with 0.17? Maybe its related to the change in
> ftdi_read_data() to hunour the usb_read_timeout. With the ongoing
> discussion, I think this change introduced by ne was wrong.

Yes, same problem persist with libftdi 0.17, as well as with old
libftd2xx-0.4.16.
Only libftd2xx-1.0.4 corrects this problem.


> Other things to test:
> - Is it a FT2232H or a older devices. There is an error
> with the older devices and sending 7 TMS changes in one command. Does
> Openocd work around it.
According to this :
http://lists.berlios.de/pipermail/openocd-development/2009-February/004808.html
it seems to be FT2232H, as my device is Amontec JTAGkey2 (I added
Laurent from Amontec to CC, maybe he could confirm).

> - Are connections flaky?

What do you concern by this ? Badly done ? I don't think so. Same
bahviour for Amontec Tiny, which is probably based on slower chip. But
Amontec probes are quite good.

> - Compare the data sent to the FT2232 in the libftdi and livftd2xx
> case. Where are the differences?
I'll have to take a deeper look at this. For the moment I have no idea
how to compile libftdi repository. There is no README, and this cmake
thing seems complicated. I posted queation on libftdi mailinglists, so
I'll see... After that I will try te test with libftdi-1.0, i.e. some
paople are suspicious about libusb. But for now I can not even build
libftdi repo...


> Otherwise the log is hard to follow. But if you are in RUN/Idle why does
> OpenOCD expect top get data back from the device?
This is beyond my knowledge at the moment.

Thanks for your help.

Best regards,
Drasko

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx

Current Thread