- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using using Cypress FX3 DVK, where Bulk Out (To receive command from Host PC) and Bulk In (To send data to the Host PC) are used.
I my design when I receive a command from host PC I will fill the In Ep data ready for PC using below commands
CyU3PDmaChannelGetBuffer (&glChHandleIntrSrc, &buf_p, CYU3P_NO_WAIT);
CyU3PMemcopy(buf_p.buffer,lBuffer,512); // where lBuffer is the data read from i2c slave connected to FX3
CyU3PDmaChannelCommitBuffer (&glChHandleIntrSrc, 512, 0);
Actually I am giving enough delay in Host PC between Out and In transfers. Sometimes before I fill the data to IN Ep in FX3 and If host tried to read the data from bulk In Fx3 hangs.
So to avoid this scenario. Whenever I receive a command from Host PC I will start a timer, If the actual data is not available when the timer expires I will commit a known data to the IN EP
CyU3PDmaChannelGetBuffer (&glChHandleIntrSrc, &buf_p, CYU3P_NO_WAIT);
CyU3PMemSet(buf_p.buffer,0xAA,512);
CyU3PDmaChannelCommitBuffer (&glChHandleIntrSrc, 512, 0);
But after this, During next command also I am getting 0xAA only.
I have attached my actual fail case scenario, using Wireshark capture please find the attached capture.
In Above Attached image
Pkt - 3. Is the bulk Out command from host PC - When I receive this data I will start preparing actual data and commit to the IN EP
CyU3PDmaChannelGetBuffer (&glChHandleIntrSrc, &buf_p, CYU3P_NO_WAIT);
CyU3PMemcopy(buf_p.buffer,lBuffer,512); // where lBuffer is the data read from i2c slave connected to FX3
CyU3PDmaChannelCommitBuffer (&glChHandleIntrSrc, 512, 0);
Pkt - 6. Actual Data is sent to the Host PC.
Pkt - 9. Sending the command from Host PC to prepare the next data to be sent to host PC
Pkt - 12.URB Function: URB_FUNCTION_ABORT_PIPE (0x0002) is received.
Any suggestions.
Thanks & Regards
Prasanna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Prasanna,
Why there are packets in the trace with source as OUT Endpoint and Destination as Host?
Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hemanth,
This issue got resolved.
Thanks
Prasanna