Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > C++ CYAPI Library XferData() timing

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



C++ CYAPI Library XferData() timing
Moderator:
RSKV

Post Reply
Follow this topic



C++ CYAPI Library XferData() timing

YoyoGo posted on 26 Oct 2012 10:14 AM PST
Senior Member
16 Forum Posts

I've written a simple console application that excercises my slave fifo design. As a test I do a single packet bulkin from one endpoint in my FPGA and then burst bulkin 16 packets from another endpoint in the FPGA. I do this 8 times in a for loop. So I know that XferData() does synchronous IO and once called doens't return until the transfer is completed. My FPGA puts out a signal that indicates whenever it is transferring data between the FX3 and itself. I see consistant periods of activity that shows how long each endpoint is actively transferring data, about 2.5 us for EP2 and about 41 us for EP1 which I know to be correct. So here is the mystery that I'm unable to solve. Sometimes XferData() will take 160 us or so to return and sometimes it will take 500+ us to return. The length of time is NOT dependent on how much data is being transferred; it's usually the same regardless of the endpoint and either short or long for both. Sometimes, the first 5 XferData() pairs will be really long and the last 3 will be around 200 us. I'm getting widely varying data rates and have no clue as to what's causing it. Anyone have ideas?




Re: C++ CYAPI Library XferData() timing

YoyoGo posted on 27 Oct 2012 12:39 PM PST
Senior Member
16 Forum Posts

... In addition I sometimes have a missing EP2 single packet xfer! Yikes!



Re: C++ CYAPI Library XferData() timing

YoyoGo posted on 05 Nov 2012 08:32 AM PST
Senior Member
16 Forum Posts

I'm finding that at random times XferData() simply isn't transferring any actual data between FPGA and the FX3. For every call to XferData() I check Nstatus and do an Abort() and print out a message if any calls to XferData() fail; I do not see any such messages. Once a call to XferData() fails to complete a transfer my application and the FX3 firmware are hosed.






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.