Problem with PC software | Cypress Semiconductor
Problem with PC software
I am using CY7C68013A to send data from FPGA to PC. The USB is configured as asynchronous Slave FIFO, EP6 with auto-in mode. Bus Hound was used to test data from FPGA and the communication was correct.
The C++ program in PC uses the DeviceIOControl to get data from OS. Code is as follows. The strange thing is the program can work when the data buffer is set to be 8192. When the data buffer is set to a small volumn, such as 1024, the software doesn't work; also when the data buffer is more than 10240, the software fail to work.
Another question is data received in the PC is not continuous, and it seems some data packages are lost during communication. (PS. single thread is used in the software). Yet, test in Bus Hound is correct and no data package is lost.
Could someone with experience in this field answer this question for me? Thank you very much!
bResult = DeviceIoControl (hDevice,