On Fri, Sep 28, 2012 at 09:33:55AM +0200, Thomas Jarosch wrote:
> Hi Thomas
>
> On Friday, 28. September 2012 09:07:06 Thomas Heller wrote:
> > So, the question is: Is it possible to clear the ft2232h output fifo?
>
> ftdi_usb_purge_tx_buffer() will do the job.
Will this purge the buffer on the chip, or just the buffers in the PC?
> > Another question: According to the data sheet the output fifo has
> > a depth of 4kBytes. In my experiments, it only buffers 1kB - is this
> > a configuration issue, is the datasheet wrong, or am I missing
> > something?
>
> This could be the latency timer. IIRC the chip buffers up to
> xx milliseconds and then sends whatever it got in the buffer.
> Try to increase it. Though I'm not sure on this one.
The latency timer is for the input buffer. If the FT2232h starts
sending data the microsecond it has a byte of data in the buffer,
it'll often get single-byte USB transactions that are very
inefficient. So the chip waits for up to <latency timer> before
sending an incomplete USB packet.
I'm not sure the ft2232h has a 4k output buffer. I remember vaguely
that it has 4k buffer space. This is then shared between various
functions, input, output, channel one, channel two.
IIRC, the INPUT side is way more critical. The PC will block, sending
data if the FPGA doesn't accept the data quickly enough. But not all
data-sources handshake with the '2232h so they (can) stop sending data
if the PC hiccups for a few milliseconds. So a large buffer on the
input side is way more important.
That's why they configured a larger buffer on the input side, and a
smaller on the output side.
Roger.
--
** R.E.Wolff@xxxxxxxxxxxx ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|