Cypress FX3 Bulk IN Endpoint Hangs

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
PrM_1403381
Level 4
Level 4
First like received First like given Welcome!

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.

pastedImage_0.png

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

0 Likes
3 Replies
lock attach
Attachments are accessible only for community members.
PrM_1403381
Level 4
Level 4
First like received First like given Welcome!

Hi,

Attached Wireshark capture.

Regards

Prasanna

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Prasanna,

Why there are packets in the trace with source as OUT Endpoint and Destination as Host?

Regards,

Hemanth

Hemanth
0 Likes

Hi Hemanth,

This issue got resolved.

Thanks

Prasanna

0 Likes