Re: [Fx2lib-devel] Isochronous Streaming Using LibUSB from FPGA
Status: Beta
Brought to you by:
mulicheng
From: Xiaofan C. <xia...@gm...> - 2011-07-08 01:51:13
|
On Fri, Jul 8, 2011 at 12:33 AM, Phil Behnke <phi...@gm...> wrote: > Hi All, > > I've been have a issue streaming data from an FPGA to a PC using the FX2LP > and LibUSB. The FPGA is sending 8 bits to the FX2 at a rate of 20MHz (152 > Mbps) using isochronous mode. The problem I'm having is that I cannot get > data from the FX2's buffer to the PC fast enough and the buffer becomes > full, causing me to miss some data. I'm not sure where the bottle neck is. > The FX2 is set to iso mode, with 1024 bytes per packet, and 3 packets per > microframe, so I should have enough bandwidth to empty the buffer. I'm > attached my firmware (fpga.c), descriptor file, and libusb driver. The > driver was written in Python using python-libusb1 wrappers. I have a LED on > the FPGA board which will read the FULL flag on the FX2 and light an LED > when full. By inspection, it looks like the LED is lit at about 50% duty > cycle. I've been working on this for quite a while and would really > appreciate any tips. > BTW, your device violates the USB spec since you need to have zero bandwidth for the default alt interface (0) for isoc, which means that you need to add that and put your high speed high bandwidth isoc endpoint in alt interface 1. But this might not cause a problem for you depending on the OS since the OS may not reject it. -- Xiaofan |