Rick Walker wrote:
> So, my question is whether the FT2232H can produce continuous byte
> streams on a fixed output clock at 1MByte/sec without requiring an FPGA
> to do further FIFO storage? I wasn't able to get this kind of operation
> from an FT245. The resulting byte stream in bitbang mode had horrible
> stuttering due to random FIFO starvation.
The FT2232H has a 4Kbyte transmit buffer. At 1Mbyte/sec output, this
means that it can only go 4 milliseconds without data from the PC.
The FTDI chips use bulk endpoints for their data. Bulk transfers make
no guarantee about latency (or bandwidth); from the spec:
5.8 Bulk Transfers
The bulk transfer type is designed to support devices that need to
communicate relatively large amounts of data at highly variable
times where the transfer can use any available bandwidth ... Bulk
transfers occur only on a bandwidth-available basis ...
5.8.4 Bulk Transfer Bus Access Constraints
... the USB System Software at its discretion can vary the bus time
made available for bulk transfers to a particular endpoint. An
endpoint and its client software cannot assume a specific rate of
service for bulk transfers ....
If you make sure that you have enough outstanding URBs at all times on
the host PC, and no other USB devices are being used, and the PC
doesn't task switch to some other process for a few milliseconds, then
you can probably get it reliable enough. But it would be far simpler
and more reliable to just put a proper buffer after the FT2232H.
USB audio uses isochronous transfers, which guarantee latency and
allocated bandwidth on the bus. The FTDI usb-serial chips don't
support this.
> I have no care about latency. I'm only interested that the byte stream
> not be broken once I start my data dump. I also don't mind up to 10%
> timing jitter on the bytestream clock, it just can't skip bytes once the
> pipe is full.
You care a little about latency, in the sense that the FTDI's FIFO
always needs to be refilled within 4 milliseconds max. If the USB
bulk transfer to the FTDI is delayed by longer than that at any time,
your output stream will be broken.
1Mbyte/sec is a relatively low data rate. You could likely use a
microcontroller at those speeds to add buffering.
-jim
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|