Re: FTDI UM245R FIFO-USB interface



Ben Jackson wrote:

On 2009-07-01, Jeroen Belleman <jeroen@xxxxxxxxxxxxx> wrote:

I'm trying to use an FTDI UM245R USB-FIFO module to read

I pump data into the FIFO at a rate of one byte every 192us
whenever there's room for it, as signalled by the /TXE flag.


I haven't used the 245 but I have used the 232R in a similar app. My
conclusion was that FTDI never intended these parts to be used to read
bulk data like this. I was using the parallel mode of the 232 with
FTDI's own library and like you I could interact with the chip's fifo
just fine but I was still losing data. Turns out that the FTDI driver
itself was periodically reading and discarding data (via a thread it
would create when you opened the device). My program was slowed down
printing more and more debug and losing more and more data but worked
if I turned off all debug. I ended up driving it from a linux box with
an open source FTDI library.

I don't know if a serial mode (such as you must be in for ttyUSB0 to
work) suffers from the same problem, but I wouldn't be surprised to
find it's hard to get it to work.

when you open a serial device in Windows, you have the option of bumping up the cache size (buffer) for the incoming data . Most people do not do that, they simply leave it as is. This leads to issues with program dogging behind, then you have the problem of drivers and the system going so slow that it just can't get there.

I don't know the size of the FTDI cache on it's own uc, but I'm sure
the driver should respond to the change of buffer size and instruct the
chip to also increase it's size unless it's already at it's max and just
uses a time out procedure to forward the incoming data.

In the old days, serial ports didn't have much for buffers if not at all. At last count, I think 16 bytes sounds about rite.



.


Quantcast