libftdi Archives

Subject: Re: data corruption at lower latency

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sat, 01 Jun 2013 12:38:50 +0200
Hi mav,

On 05/31/2013 08:54 PM, mav wrote:
> Not yet, testing on a PC is my next plan. The hardware may not be
> providing required processing power, but so far I can't conclude so.
> It may get clarified by executing the test on a PC setup.
> 
> The modem communicates well if FTDI chip and its corresponding USB
> chain is bypassed. When FTDI and USB are brought in, the serial lines
> sporadically gets 2 unwanted bytes which corrupts the data stream. The
> two erroneous bytes are always printed as 2` which if mapped to the
> FTDI  Status Bytes will translate to [0011 0010 0110 0000]; this
> indicates THRE, BI and OE bits are set.
> 
> The same 2 bytes are also seen on the second FTDI chip which is left
> to run at the chip's default latency (16ms) and is running slower
> @19200 baud (the first line is @115200 baud). I suspect the erroneous
> bytes are coming from the underlying USB libraries, and I am still
> looking for ways to confirm this.

take a look at the ftdi_read_xxx() functions:

The status bytes are sent with every incoming usb packet
of the read request and then filtered by the code.

May be the filtering has a bug or the status bytes
appear at an unexpected position.

I would start by adding raw logging of the data
to disc and then examine it, may be create a new
file for every incoming packet so it's nicely partitioned.

Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread