- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1、If I use the in Endpoint of cyusb3014 to receive data continuously, which can be suspended by FPGA logic, how to judge that the in buffer of 3014 has more data to avoid the error of reading, When I suspend the continuous input data.
2、If I suspend the continuous input data, how to clear the useless data of in buffer of 3014 to avoid the mistake reading of next start?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. You can setup a counter in DMA producer event and decrement it in the DMA Consumer event. This tells whether there is any data left in the DMA memory (DMA buffer) NOT the endpoint memory. Looks like there is no API to read whether there is any data in the Endpoint memory. It is good to reset the endpoint and DMA buffer when there is suspend and resume of data flow.
2. Please refer CyFxUvcApplnStop in the AN75779. This handles the stopping the GPIF, clearing the DMA and Endpoint memory. You can implement the same in your code. Also refer CyFxUvcApplnStart.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1. You can setup a counter in DMA producer event and decrement it in the DMA Consumer event. This tells whether there is any data left in the DMA memory (DMA buffer) NOT the endpoint memory. Looks like there is no API to read whether there is any data in the Endpoint memory. It is good to reset the endpoint and DMA buffer when there is suspend and resume of data flow.
2. Please refer CyFxUvcApplnStop in the AN75779. This handles the stopping the GPIF, clearing the DMA and Endpoint memory. You can implement the same in your code. Also refer CyFxUvcApplnStart.