Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Time between transfers

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



Time between transfers
Moderator:
RSKV

Post Reply
Follow this topic



Time between transfers

IRod posted on 28 May 2012 6:26 AM PST
Senior Member
11 Forum Posts

 Hi all,

I am reading data from PC through a single BULK endpoint in a slave fifo scenario. I am continuously reading data (1 frame) at high speed (~1,5Gbps) and I need to minimize the time between two consecutive transfers (2 frames, over different buffers) to achieve that speed.

Transferred images are about 10MB and there is a maximum time of ~2,5ms between two consecutive frames, so the time between consecutive requests must be less to that time. Unfortunately the PC last more than 2,5ms.

Does anybody know how to minimize that time without decreasing the frame-rate?. 

Thanks in advance,




Re: Time between transfers

aasi posted on 28 May 2012 07:03 AM PST
Cypress Employee
1073 Forum Posts

Hi,

What APIs are you using to do this read?

Xferdata or the async method of Begindataxfer/waitforxfer/finishdataxfer?

Regards,

Anand



Re: Time between transfers

IRod posted on 28 May 2012 07:41 AM PST
Senior Member
11 Forum Posts

Hello Anan,

XferData() function.

Regards,

Israel



Re: Time between transfers

IRod posted on 28 May 2012 09:06 AM PST
Senior Member
11 Forum Posts

 I was wondering If could be possible to begin more than one IN bus transaction at the same time (according to USB3.0 spec chapter 8.1 it isn't). 

It is, having 2 DMA channels auto one-to-one from GPIF to an IN BULK endpoint. GPIF sends a single frame (as many buffers as required) to an endpoint and after do the same to the other endpoint and so on. Meanwhile, the PC will waiting both transactions in 2 different threads.

This way when one transaction finishes, the other thread in the PC is ready to receive data because was waiting previously and the time between requests is removed.

Anyway, I am not sure if it can be done as indicated above.

Best regards,

Israel

 



Re: Time between transfers

aasi posted on 28 May 2012 10:46 AM PST
Cypress Employee
1073 Forum Posts

If you use Xferdata() this is how it works. Once the transfer complete it will return and then you'll queue up the next transfer and there is time wasted from the time a transfer completes and the next one is queued. In your case this is what is causing the 2~5ms delay.

Begindataxfer/waitforxfer/finishdataxfer lets you queue mulitple transfer. This way as soon as one transfer completes the next one is queued. So the transfer rate will be faster. Please use screamer/streamer as example to understand how to use the async method

Regards,

Anand



Re: Time between transfers

IRod posted on 29 May 2012 10:12 AM PST
Senior Member
11 Forum Posts

 Thank you Anand,

You put me on the right direction. Now it is working.

I have a doubt yet. I was struggling with overlapped array size because I set size to CyConst.OverlapSignalAllocSize. Finally it worked using 20 as in stream application. What does that 20 mean?.

Best regards,

Israel






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.