libftdi Archives

Subject: Re: ftdi_set_bitmode question

From: Joachim Schambach <jschamba@xxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 02 Aug 2011 17:42:03 -0500
I am not totally sure how to interpret usbmon output, but it looks like all
packets that I am requesting are actually going out.
Here is the output when I just do one ftdi_write_data call, and execute the
program twice:

f62a4140 770501648 S Co:007:00 s 40 00 0000 0000 0000 0
f62a4140 770501720 C Co:007:00 0 0
f62a4140 770502123 S Co:007:00 s 40 03 4138 0001 0000 0
f62a4140 770502217 C Co:007:00 0 0
f62a4140 770502454 S Ci:007:00 s c0 90 0000 0043 0002 2 <
f62a4140 770502592 C Ci:007:00 0 2 = 0000
f62a4140 770502603 S Ci:007:00 s c0 90 0000 0044 0002 2 <
f62a4140 770502717 C Ci:007:00 0 2 = 0000
f62a4140 770502850 S Bo:007:02 -115 100 = 00010203 04050607 08090a0b 0c0d0e0f
10111213 14151617 18191a1b 1c1d1e1f
f62a4140 770503717 C Bo:007:02 0 100 >
f62a4140 770504829 S Co:007:00 s 01 0b 0000 0000 0000 0
f62a4140 770505717 C Co:007:00 0 0


d89e87c0 841790192 S Co:007:00 s 40 00 0000 0000 0000 0
d89e87c0 841790340 C Co:007:00 0 0
d89e87c0 841790497 S Co:007:00 s 40 03 4138 0001 0000 0
d89e87c0 841790586 C Co:007:00 0 0
d89e87c0 841790826 S Ci:007:00 s c0 90 0000 0043 0002 2 <
d89e87c0 841790961 C Ci:007:00 0 2 = 0000
d89e87c0 841790973 S Ci:007:00 s c0 90 0000 0044 0002 2 <
d89e87c0 841791086 C Ci:007:00 0 2 = 0000
d89e87c0 841791213 S Bo:007:02 -115 100 = 00010203 04050607 08090a0b 0c0d0e0f
10111213 14151617 18191a1b 1c1d1e1f
d89e87c0 841792086 C Bo:007:02 0 100 >
d89e87c0 841793348 S Co:007:00 s 01 0b 0000 0000 0000 0
d89e87c0 841794086 C Co:007:00 0 0


and here is the output with 2 ftdi_write_data calls, the first one with 100
bytes, the second one with 1 byte:

d89e8b40 881618429 S Co:007:00 s 40 00 0000 0000 0000 0
d89e8b40 881618554 C Co:007:00 0 0
d89e8b40 881618734 S Co:007:00 s 40 03 4138 0001 0000 0
d89e8b40 881618800 C Co:007:00 0 0
d89e8b40 881619044 S Ci:007:00 s c0 90 0000 0043 0002 2 <
d89e8b40 881619175 C Ci:007:00 0 2 = 0000
d89e8b40 881619187 S Ci:007:00 s c0 90 0000 0044 0002 2 <
d89e8b40 881619300 C Ci:007:00 0 2 = 0000
d89e8b40 881619432 S Bo:007:02 -115 100 = 00010203 04050607 08090a0b 0c0d0e0f
10111213 14151617 18191a1b 1c1d1e1f
d89e8b40 881620175 C Bo:007:02 0 100 >


f3d8e1c0 890739732 S Bo:007:02 -115 1 = 00
f3d8e1c0 890739845 C Bo:007:02 0 1 >
f3d8e1c0 890740964 S Co:007:00 s 01 0b 0000 0000 0000 0
f3d8e1c0 890741967 C Co:007:00 0 0


So if I am seeing this correctly, both programs end the same way.
But in the first case, I don't see the second invocation in the FPGA, while in 
the second case, every write can be seen in  the FPGA.

Jo


On 7/27/2011 7:49 AM, Michael Plante wrote:
> Joachim Schambach wrote:
>>> i.e. no data is being received into the FIFO from
>>> the Linux box. Yet on the Linux side, the call returns with no error, as
> if the
>>> call succeeded.
>>> After some experimentation, I finally found that everything worked
> correctly
>>> again when I added a second ftdi_write_data call, even if that one only
> sent 1 byte.
>>> So I tried the same thing with the libftd2xx library from FTDI, and
> indeed, that
>>> one behaved the same way.
>>> [...]
>>> So either I am missing something fundamentally, or something is weird
> with the
>>> Linux USB implementation. And yes, I did call rmmod ftdi_sio and rmmod
> usbserial.
>
>
> Maybe see if usbmon shows it going out?
>
> Michael
>
>
> --
> libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
> To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

-- 
Dr Joachim Schambach                 tel: x1 512 471 1303
The University of Texas at Austin    fax: x1 814 295 5111    
Department of Physics                email: jschamba@xxxxxxxxxxxxxxxxxx
1 University Station C1600
Austin, Texas 78712-0264, USA


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

Current Thread