Isochronous USB Transfer Completion Detection | Cypress Semiconductor
Isochronous USB Transfer Completion Detection
I am using Isochronous USB to transfer data from the PsoC5LP Devkit to a host PC. If, I sit in a tight loop loading the endpoint with data, the host receives everything intact. In my application, I will not be able to sit in a tight loop feeding the end point as I must wait for data to be created before I can send it. It takes 10s of ms to generate enough data to transmit.
If I load the endpoint with data, delay a few ms, then load the endpoint with new data and delay a few ms, then the data received by the host is corrupted, I believe that the issue is caused by new data being loaded into the endpoint while data is being sent over the USB bus. I need a way of knowing when my Isochronous USB transfer has finished that way I can set the endpoint's paylaod length to 0 while I am waiting for new data to be created. Also, I need a way of knowing when it is safe to load the endpoint with new data, as it seems to me that there could be an issue caused when loading new data into the endpoint. I am imagining issues popping up with the USB endpoint being halfway loaded with new data and a USB data request coming in from the host.
Any help and feedback is greatly appreciated!