- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
- CyU3PDmaMultiChannelAbort
- CyU3PUsbFlushEp
- CyU3PDmaMultiChannelReset
- CyU3PDmaMultiChannelSetXfer
- 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.
Thanks
Behzad
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issue solved by keeping the reset DMA/USB function out of the DMA callback.
Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Behzad,
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:
- CyU3PGpifSMSwitch
- CyU3PUsbFlushEp
- CyU3PDmaMultiChannelReset
- CyU3PDmaMultiChannelSetXfer
- CyU3PGpifControlSWInput
Let me know if you are able to reset with the above steps and there are no DMA callbacks seen.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AliAshgar,
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi AliAsgar,
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.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In that case, let us continue our discussion on IFX-221221-791502 itself.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issue solved by keeping the reset DMA/USB function out of the DMA callback.
Regards,
AliAsgar