Hello, I'm wrting a very simple program to send file to USB as follows:
... LONG count;
#define BUFSIZE 0x100000
and I also use asynchonous method :
UCHAR *outContext = USBDevice->BulkOutEndPt->BeginDataXfer(buffer, count, &outOvLap);
USBDevice->BulkOutEndPt->FinishDataXfer(buffer, count, &outOvLap,outContext);
The two methods both run OK By USB2.0, but By USB3.0, They can only send a little data and then fail.
Please help me!
Thanks & Best Regards,
Your code snippet looks fine. This can be an issue in your firmware or in your board too
In order to isolate . Please do the following
1) Program the device with Bulk loop example project and test with our Control Center and Streamer applications. Ensure device has enumerated as USB3.0 .If this work there is no issue in your board .
2) Program the device with your project . Ensure device is in USB3.0. Try sending the data using Control Center and see if you are seeing any issue . If there is no issue then it is not your FX3 firmware issue.
3) Program the device with Bulk Loop project and try using your host application and see if it work.
Try to figure which among the above 3 cases cause failure . A USB traces would help you in resolving this issue faster.
If I use Control Center to send data less then 16KB, it runs OK, But If I send data with large size, it fails both in USB2.0 and USB3,0.
If I use my tool to send data, there is no problem both in USB2.0 and USB3.0 unless data size. But In USB 3.0, I can't send data even more than 8KB
Now I program USBBulkLoopManualInOut.img to RAM, and write code like this,
#define BUFSIZE 0x1000
// TODO: Add your control notification handler code here
unsigned char* buffer=new unsigned char[BUFSIZE];