libftdi Archives

Subject: Re: Help reviewing MPSSE layer + libfti class

From: Ryan Tennill <rtennill@xxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 24 Sep 2013 15:39:24 -0500
On Tue, 2013-09-24 at 12:00 -0700, Chaves, Kevin wrote:
First I have to say thanks, I’ve asked for some really basic help and have made progress! But I had to make my own MPSSE layer to be able to easily switch between linux <-> windows.

 

I used c++ so I could make an ILink interface (basic read/write) wrapper around either the d2xx drivers from ftdi or libftdi. They both work great! However I managed to gain about 140 ms per transaction (40ms to read 8k bytes, 180ms after I made the mpsse layer). It appears to be in libftdi itself, ftdi_read_data takes much longer, so I’m not sure my init is incorrect since I basically copied an example I found somewhere.

 

My co-workers have proven to be kind of useless for asking for help, I know it’s something I did though since I can revert to just prior to my new layer and its 40ms. Once I updated its 180ms. Its driving me nuts because everything I fire down the pipe to the ftdi chip appears to be the same with the usb sniffer, and my configuration for libftdi seems to be identical. I’m missing something and I’m not sure where it is.

 

If anyone is willing to review some code, I’d be happy to email it.

 
I don't know if it effects MPSSE mode but you might check the latency timer. The latency timer tries to avoid partial data packets by waiting for more data to show up before transmitting. If you partially fill the buffer it waits for the timer (default is 16ms at least for FT232R) to expire before sending the packet.

You should be able to use ftdi_get_latency_timer() with a valid context and byte sized variable to get the timer in ms.





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





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


Current Thread