Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > XferData returning false

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



XferData returning false
Moderator:
RSKV

Post Reply
Follow this topic



XferData returning false

dreitz posted on 16 Jul 2012 11:49 AM PST
Top Contributor
74 Forum Posts

CyUSBEndPoint.XferData is returning false occassionally, but it's not because of a timeout.  My timeout value is 10 seconds.  When it fails, it fails quickly.

What other conditions would cause XferData to return false?




Re: XferData returning false

aasi posted on 17 Jul 2012 12:45 AM PST
Cypress Employee
1073 Forum Posts

Receiving more data than what was requested can also cause this. Say we request 128 byte and the device responds with a 512 byte packet then it'll fail.

Most cases we run into this scenario when we work with short packets.

 

Anyways the error code should us more about the issue. Please let us know the error code being returned.

Regards,

Anand

 



Re: XferData returning false

RSKV posted on 17 Jul 2012 01:47 AM PST
Cypress Employee
655 Forum Posts

Please get the error code using the LastError member varible of CyUSBDevice, it will give you the Win32 error code returned by GetLastErrorCode() Win 32 API.

Regards,

sai krishna.



Re: XferData returning false

dreitz posted on 18 Jul 2012 10:54 AM PST
Top Contributor
74 Forum Posts

It's returning a 997.  Overlapped I/O operation is in progress.

Is there a way to determine if the DMA producer is getting a overrun?



Re: XferData returning false

RSKV posted on 19 Jul 2012 11:12 PM PST
Cypress Employee
655 Forum Posts

It is looking like IO is not completed yet,  application has to wait for more time. You might want to increase the time out for transfer, default time out is 10 seconds.

Regards,

sai krishna.



Re: XferData returning false

dreitz posted on 19 Jul 2012 09:46 AM PST
Top Contributor
74 Forum Posts

It's not a timeout.  It fails immediately.  I have seen timeouts and see the expected 10 second pause.  This is something else.



Re: XferData returning false

Sil posted on 20 Jul 2012 12:50 AM PST
Top Contributor
93 Forum Posts

Hi dreitz

 

When you are calling the UsbdStatus() function does it also say that the state is STALLED witch status UNKNOWN? This is what is usually observe once the XferData function fails.

 

-Silvio



Re: XferData returning false

dreitz posted on 23 Jul 2012 10:11 AM PST
Top Contributor
74 Forum Posts

I get [state=HALTED status=UNKNOWN].



Re: XferData returning false

byeyear posted on 24 Jul 2012 12:13 AM PST
Top Contributor
29 Forum Posts

Hi, I meet the same error as yours, and I can not find any reason yet. 



Re: XferData returning false

aulucan posted on 27 Jul 2012 04:01 AM PST
Senior Member
19 Forum Posts

dreitz and byeyear,


If you are using sync. SlaveFifo interface in your designs, you can try to decrease PCLK frequency to 90MHz or 95MHz.
We get same error message "[state=HALTED status=UNKNOWN]" when PCLK frequency is 100MHz. But 95MHz works fine.


Regards,
Ali



Re: XferData returning false

dreitz posted on 27 Jul 2012 07:46 AM PST
Top Contributor
74 Forum Posts

We are running PCLK at 50Mhz.  Would it matter that PCLK be divisible by 8 or something?  Kinda like the old baud rate frequencies...






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.