libftdi Archives

Subject: Re: ftdi_set_bitmode question

From: Joachim Schambach <jschamba@xxxxxxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 12 Aug 2011 14:56:38 -0500
I might have found the problem after all.
It is not the setting of the BITBANG mode that messes up the FPGA, but the reset
to FIFO mode.
When I just leave the second interface in BITBANG mode and simply close it after
setting all necessary bits, everything works.
Thanks for everyone's help on this....

Cheers,
Jo

On 8/12/2011 2:21 PM, Joachim Schambach wrote:
> PS:
> just tested the original issue for my post, namely bitbang mode. 
> Unfortunately,
> this did not get solved by moving to Fedora 15. The bitbang mode still seems 
> to
> toggle bits that are not in the bit mask given to the call, as the signaltap
> indicates that it has an invalid jtag configuration after ftdi_set_bitmode is
> called....
> Jo
>
> On 8/12/2011 1:49 PM, Joachim Schambach wrote:
>> As another test, I installed Fedora 15 on the same machine, and then ran 
>> exactly
>> the same program. This time, everything worked as expected, i.e. with just 
>> one
>> call to ftdi_write_data I can call the same program several times, and every
>> time I see the write in signaltap.
>> BTW, I am still using libftdi 0.19 on this Fedora installation.
>>
>> So it seems to be a kernel problem?
>>
>> Cheers,
>> Jo
>>
>> On 8/3/2011 1:39 AM, Xiaofan Chen wrote:
>>> On Wed, Aug 3, 2011 at 11:17 AM, Michael Plante
>>> <michael.plante@xxxxxxxxx> wrote:
>>>> Joachim Schambach wrote:
>>>>>> I am not totally sure how to interpret usbmon output, but it looks like 
>>>>>> all
>>>>>> packets that I am requesting are actually going out.
>>>> I am not either.  I just know that's an intermediate troubleshooting step.
>>>> There are several people on the libusb list who can help interpret it.  I
>>>> recommend writing there if no one gets back to you in a few days here.
>>> Good suggestion. Alan Stern, for one, will help to decode the
>>> usbmon log pretty fast.
>>>
>>> On the other hand, the usbmon does not seem to tell much if I try to
>>> follow the usbmon.txt to parse the log.
>>> http://www.mjmwired.net/kernel/Documentation/usb/usbmon.txt
>>>
>>> So maybe the problem is on the FPGA side.
>>>
>>> f62a4140 770501648 S Co:007:00 s 40 00 0000 0000 0000 0
>>> f62a4140 770501720 C Co:007:00 0 0
>>> http://lxr.linux.no/#linux+v3.0/drivers/usb/serial/ftdi_sio.h
>>> Vendor specific request, FTDI_SIO_RESET, Reset
>>> Status ok
>>>
>>> f62a4140 770502123 S Co:007:00 s 40 03 4138 0001 0000 0
>>> f62a4140 770502217 C Co:007:00 0 0
>>> Vendor specific request, FTDI_SIO_SET_BAUDRATE
>>> Status ok
>>>
>>> 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
>>> Vendor specific request, FTDI_E2ROM_READ
>>> (ftdi_read_chipid).
>>> Status ok
>>>
>>> d89e87c0 841791213 S Bo:007:02 -115 100 = 00010203 04050607 08090a0b 
>>> 0c0d0e0f
>>> 10111213 14151617 18191a1b 1c1d1e1f
>>>
>>> Bulk Out transfer submission, device 7, EP 2 Out, 100 bytes of data,
>>> only partially (up to 32bytes, from 0x00 to 0x1f) displayed.
>>>
>>> d89e87c0 841792086 C Bo:007:02 0 100 >
>>> Bulk Out transfer completion, device 7, EP 2 Out, 100 bytes of data,
>>> status ok (means bulk out transfer is successful).
>>>
>>> d89e87c0 841793348 S Co:007:00 s 01 0b 0000 0000 0000 0
>>> d89e87c0 841794086 C Co:007:00 0 0
>>>
>>> This is a standard set_interface request (select interface 0)
>>> when the device is closed.
>>>

-- 
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