XferData(): Losing data? | Cypress Semiconductor
XferData(): Losing data?
I am writing software that deals with a device that's under development. The device collects data for a period of time, which is programmable, and sends the result as a block of 64k bytes to the PC via FX3. I receive the block through a CCyUSBDevice's BulkInEndPt by calling XferData(). I am finding that if I choose a timeout value short enough for the function to fail (because the data is yet to arrive) that it sometimes never succeeds on subsequent calls. Effectively, the data is lost. If I sit in a loop calling XferData(), the probability of losing the data increases as the timeout value I choose gets shorter. If I don't call it until after the data should have arrived, it never fails. Is this known behaviour of XferData(), or is the problem likely to be in the device? If it's the device, can anyone suggest a likely cause? (I am not a hardware person, but I can pass on responses to the device's designer.)