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.



.



Relevant Pages

  • Re: Developing interrupt driven serial driver
    ... My next task is to make this driver codebase interrupt driven. ... deassert CTS so that the DTE would stop sending when the FIFO is full. ... interrupt handler for the receiver put the data into a larger buffer ...
    (comp.arch.embedded)
  • Developing interrupt driven serial driver
    ... I am writing driver code for the serial communications interface of the TI TMS320F2812. ... I am first trying to understand all of the reasons for using interrupts, and what the range of implementation possiblities might be. ... the simplest case would be to have the FIFO threshold interrupt handler deassert CTS so that the DTE would stop sending when the FIFO is full. ... By having the interrupt handler for the receiver put the data into a larger buffer than the 16 byte FIFO, and base the CTS state on the condition of the larger buffer rather than the FIFO then the user code can process data in larger chunks and less frequently. ...
    (comp.arch.embedded)
  • Re: 2.6.x: iowait problem while burning a CD
    ... >> condition MKFS seems unable to fill the FIFO buffer as quickly as the ... Using generic SCSI-3/mmc CD-R driver. ... Waiting for reader process to fill input buffer ... ... Writing pregap for track 1 at -150 ...
    (Linux-Kernel)
  • Re: FTDI & Win/D2xx driver questions
    ... with the D2xx drivers. ... The driver always passes the data straight through. ... reads the response from the microcontroller from the FTDI buffer. ...
    (comp.arch.embedded)
  • Problem with FT245BM
    ... I have a strange problem with a FTDI FT245BM USB interface IC. ... As soon as i enable the "pull down IO pins in USB suspend" option in the ... I think a have found what causes the FIFO state/content to be corrupted. ... As this only happens with the pull-down option enabled, ...
    (comp.arch.embedded)