problem when using FX3 C# streamer example

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I am trying to use EZ-USB FX3 C# Streamer Example to transfer data from Host to Device as fast as possible.

   

The XferData function in the example re-submit the xbufs into queue without filling with new data.

   

As follows:

   

// Re-submit this buffer into the queue 

   

if (OutEndPoint.BeginDataXfer(ref cBufs, ref xBufs, ref len, ref oLaps) == false)
    Failures++;

   

I opened a new big buffer with data to transfer.The data is read from a file before start the loop.

   

If I modify xBufs' content, the device will at most accept 4  package; if not, It is fast enough.

   

The functions is here.

0 Likes
4 Replies
Anonymous
Not applicable

Please let me know what problem you are facing. We have provided Streamer application in FX3 SDK, which uses the same method of asynchronous Xfers. Please check and let me know if you have questions

0 Likes
Anonymous
Not applicable

See the attachment,find the line:xBufs = dataToSend[nIteration ];//if comment this line,all goes well.

   

If this line is commented,this function will run very good.If not commented, successes will be 4 ,and successes and fails will not be increasing.Then if I reopen the host software, successes will be 0 too.So I have to reset device board. 

   

My purpose is transfer data from host to device,the sooner the better.The data comes from a file of host.My host is win7 and Visual Studio 2010.   

0 Likes
Anonymous
Not applicable

Or do you have a streamer C# example  which transfer dynamic data, such as from/to a file ?

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Please find the attached host application along with source code. It is a modification of the C# Streamer project which is used to obtain data from an FX3 Device.

   

Before starting the streamer, program the FX3 and  Make sure that the "Save to Disk" check box is ticked. 

0 Likes