On 03/02/2012 10:18 AM, Yunong Pang wrote:
> Hi all,
> 
> I use PyUSB to read data from EZ-USB FX2LP(68013). 
> 
> What I want is to read data from the Endpoint continually, so that I can
> avoid the loss of data in FX2LP's FIFO.
> That is to say, I'd like to read the data in Endpoint as soon as it is full.
>  How can I achieve that? How can I monitor the status of Endpoint in pyusb?

This is not an unusual problem when dealing with the FX2. The issue is that
it can send data very fast, but doesn't really have enough internal buffer
space to handle retransmits if anything goes wrong. When sending at full
blast, that could include some other traffic on the bus, or a small delay by
the host in processing the incoming data.

How we got around this in the sigrok project was to process the incoming
packets asynchronously, and keep something like 10 async requests queued at
any one time. This is still not 100% of course, but if you're not saturating
the bus this should keep things stable. Certainly you'll never get things
working any better with sync transfers.

As to how you can do async comms with pyusb, that I'm not sure.


-- 
Bert Vermeulen        b...@biot.com          email/xmpp

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to