Read pipe stall after zero sized packet

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I'm using Cypress EZ-USB FX3 SDK v 1.3.3.

   

To increase transfer speed I choose an asynchronous model and BULK transfers. 
So sometimes (after 3, 10 or 30 minutes, times vary) I received a Stall condition. 
Received data lenght ("rLen" in code sample) in this case is 0. In all other cases it's more than zero. 
After receiving Stall I try to Abort and Reset Pipe (without success).

   

Also I try to close transfer using FinishDataXfer. 
And while do this I receive such exception "Invalid address specified to RtlValidateHeap( 0000000000A10000, 000000002C4B4A50 ) " at one of the queue element. 
Can you help me with this situation? 
 

0 Likes
2 Replies
Anonymous
Not applicable

I see that you are resetting the pipe after the error condition from the host side. What do you do from the FX3 device when you receive a stall?  You need to reset the DMA channel and the USB EPs once the error happens. This you can do using a clear feature request. We have handled the clear feature request in AN75779 firmware which you can take reference from. Also, you can refer the Cypress streamer application which uses asynchronous methods of transfer.

0 Likes
Anonymous
Not applicable

Thank you for answer!

   

Yes, we reset USB EPs. We already using asynchronous methods of transfer. Can you tell me the reason of this stall and how to avoid it?

0 Likes