libftdi Archives

Subject: RE: MPSSE Send Immediate not working?

From: "Fewell, Edward" <efewell@xxxxxx>
To: "libftdi@xxxxxxxxxxxxxxxxxxxxxxx" <libftdi@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 Aug 2010 16:56:33 -0500
Michael Plante wrote:
>> Fewell, Edward wrote:
>> >> This works well on Windows using FTDI's driver, but doesn't
>> >> seem to be working at all on Linux with libftdi.
>>
>> You might also try:
>>
>> 1) libftdi on Windows
>>
>> 2) FTDI's driver on Linux
>>
>> This could narrow down the variables.  I should mention that FTDI's driver
>> appears to have some issues (or did when I studied it a year ago), so I
>> would be careful how much I relied on it in the end, but, for debugging
>> purposes, it may be fine.
>>
>> Michael

OK, here are some results for comparison.  We have a benchmark test that 
executes a sequence of JTAG scans.  Because the internals are a bit of a black 
box, I can't be sure exactly the number of USB transactions going on, but the 
scan manager's adapter generally bundles up all JTAG state transitions and data 
shifting into a single buffer to pass down to the FT_Write or ftdi_write_buffer 
call (depending on driver being used). Also, the times depend on other 
variables such as TCLK frequency.  So for these tests I've kept everything the 
same except as noted below, and the times should taken as relative (min:sec):

FTDI's driver on Windows (XP, Service pack 3):
Latency timer = 255, benchmark time = 0:59
Latency timer = 0, benchmark time = (not tested, driver doesn't allow 0)

libftdi driver on Windows:
Latency timer = 255, benchmark time = >1 hour 
Latency timer = 0, benchmark time = 2:09

FTDI's driver on Linux (Ubuntu 10.04 LTS, kernel 2.6.32-24 generic):
Latency timer = 255, benchmark time = 3:53
Latency timer = 0, benchmark time = 1:44 (hacked driver to allow 0)

libftdi driver on Linux:
Latency timer = 255, benchmark time = >1 hour
Latency timer = 0, benchmark time = 1:20

I've confirmed Send Immediate is appended to the end of every set of MPSSE 
commands sent to our device.  I expected that the latency timer would have no 
effect at any setting, or possibly slightly worse performance when set to 0 or 
1 (could start splitting return packets because of timeouts).  It seems that 
with the libftdi driver on either Windows or Linux, the Send Immediate isn't 
working and the return data is waiting for the latency timer. I have no clue 
what's going with FTDI's driver on Linux.  And the FTDI driver on Windows seems 
to be working as I expect.

Edward Fewell

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

Current Thread