Hi, I am using CYUSB3014 to stream live images to the PC using a bulk endpoint. I get error 997 for WaitForXfer , FinishDataXfer. Also I get USB underrun error in the firmware.
I am using DMA in manual many to one having two GPIF as the producers and one USB (CY_U3P_UIB_SOCKET_CONS_1) as the consumer. There are two buffers per sockets. When there are some errors I like to reset the whole stream of the data. The code I return resets the GPIF using CyU3PGpifSMSwitch to go to start state then I run the followings:
- CyU3PGpifControlSWInput, I use this to resume the GPIF to generate the data and starts to commit them.
The thing is when I run the above I can see the call back for the DMA is being called four times saying there consumer event. I am wondering why when I run the above the call back for the DMA is being called four times.
I assume the transition from start state (IDLE) to the next state is through a FW_TRG. Is my assumption correct?
Could you try following a different order for API calls for reset:
Let me know if you are able to reset with the above steps and there are no DMA callbacks seen.
Thanks for the quick reply, I tried what you said and I still have the same problem. I attached the GPIF project and the source code for the streaming call back I have. The things i observe is when i tried with your suggestion Iget USB underrun error a lot mode. The way it was before it get less USB under run error. Actually this USB under run error is my main problem.
Thanks for looking at this issue.
I moved the zip file to the techsupport : IFX-221221-791502, since it is more private and it is better for us to not share our source codes to the public domain.
In that case, let us continue our discussion on IFX-221221-791502 itself.