>>>>> "Dean" == Dean <dean@xxxxxxxxxxxxxxx> writes:
Dean> I am having trouble with a 232R in BITMODE_SYNCBB mode. Basically
Dean> I can't write more than 384 (exactly) bytes without reading. If I
Dean> continuously read the buffer back after writing it works but that
Dean> creates timing problems for me. I tried the same exact program on
Dean> a 4232H and it works properly. I compiled a test program against
Dean> the FTDI libraries and I was able to write 16k buffers without
Dean> reading on the 232R. I built the same test program against
Dean> libftdi and it still had the 384 byte limitation.
Dean> I've tried messing with many baudrates and chunksizes to no avail.
Dean> I'm using libftdi-0.19/libusb-0.1.12 on a Mac running 10.6.8
Dean> (64-bit).
Dean> I also tried the same exact code on Ubuntu 10.10 with the same
Dean> result, only instead of ftdi_write returning 0 it returns -110
Dean> (usb bulk write failed)
Dean> I tried libftdi-0.19/libusb-1.0.8 with libusb-compat and had the
Dean> same result, with ftdi_write returning -60 (usb bulk write failed)
Dean> Finally I tried libftdi-1.0 (from repo) and libusb-1.0.8 and still
Dean> had the same result, with ftdi_write returning -1 (usb bulk write
Dean> failed)
Dean> The main thing that confuses me is that the "official" FTDI driver
Dean> uses libusb-1.0.8 and does not exhibit the same problem.
For every BITMODE_SYNCBB write() you must issue one BITMODE_SYNCBB read(),
as one read byte is generated for every write. 384 Bytes is the read FIFO
size and as soon as the read fifo is full, the whole BITMODE_SYNCBB machine
stalls.
The FTD2XX driver continously read the device in a seperate thread, even if
you don't issue FT_Read() commands.
Dean> Does anyone have any ideas? Is there something that I'm missing?
As explained above, you need to issue appropriate sized ftdi_read_data()
commands.
Bye
--
Uwe Bonnes bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|