We encounter bulk transfer problems with the CYUSB3.0 when performed repeatedly for a long period of time - any help or input on this is very much appreciated.
Background: We want to use bulk in endpoint to do continuous data transfer. in our test stage,
we use slave fifo in the device, and software on pc is based on CyUSB.DLL.
the code is just like the below,
CyUSB_CyBulkEndPoint_XferData_1 (my_cybulk_inendpoint, Xfer, &in_length_sample, &in_len_sample, &xfer_data_in_returnvalue, 0);
fopen (browse_pathname, "ab");
fwrite (Rx_buffer, 1, in_len_sample, fp);
We allocate x MB memory for Xfer,when CyUSB_CyBulkEndPoint_XferData_1 get x MB data ,we save it to file .
when we start bulk in transfer, it goes well at first, but fails very soon.We allocate 1 MB memory for Xfer,we get the first 1M data correct,then it lost some data,then it can get another 1M data correct,then it repeats.
And,We allocate 2 MB memory for Xfer,we get the first 2M data correct,then it lost some data,then it can get another 2M data correct,then it repeats.
Thougts & Questions:
1、why we just get x MB data correct?Does the fuction CyUSB_CyBulkEndPoint_XferData_1 excute take too long time?
2、can we use Bulk Synchronous slave fifo transfer continuous data ? we should use isochronous slave fifo mode to transfer continuous data?
any advices will be appreciated!