Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Increase data transfers on FX2 using two IN EPs in parallel

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



Increase data transfers on FX2 using two IN EPs in parallel
Moderator:
RSKV

Post Reply
Follow this topic



Increase data transfers on FX2 using two IN EPs in parallel

vbowy posted on 06 Jun 2012 3:05 AM PST
Member
3 Forum Posts

Hi everyone,

I am actually doing a data transfer application using a FX2LP. Data is flowing between FX2 and a PC. I use 2 EPs: one as IN FIFO, the other as OUT FiFO.

EP OUT is EP2, type=bulk, size=512, buf=quad;

EP IN is EP6, type=bulk, size=512, buf=quad.

The data size to be transferred to the PC (flowing through IN FIFO) is large and I need the writing to EP to be faster. Pauses are occuring sometimes while the data is being written on EP IN (USB can be busy, so the data is not read fast enough from the EP6. EP6 is not then emptied fast enough and the data transfer is stopped for a little while). I want to avoid such a behaviour.

I would like to know if the following ideas are correct and feasible:

1 - Is it possible to add a second IN EP (e.g. EP8) that would be filled in case that EP6 is full? I guess when the EP6 gets full, the data writing switches to EP8. While EP8 is being filled, USB reads data from EP6 that is not full anymore. Finally when EP8 is full, the data writing can switch again to EP6 because its data has already been transferred.

2 - The other idea is to implement on PC side a function that would create two different threads, each of them accessing the same in-endpoint EP6. This would empty it faster and I guess it would almost never be full. That is the data writing on EP6 would never stop.

Do you think one of these could be efficient ? In this case I would like to know some advices to implement it (e.g. which registers do I need to configure, in what order, etc?) I did'nt find anything about it on the manuals, did I miss some paragraphs?

Thank you for your answers,

Do not hesitate to ask me for further details if I wasn't clear enough.

Regards,

Valentin




Re: Increase data transfers on FX2 using two IN EPs in parallel

RSKV posted on 08 Jun 2012 11:01 PM PST
Cypress Employee
655 Forum Posts

 As per my understanding, you will see that scenario as long as you use BULK transfers.

The fact about these BULK transfers is that transfers are bursty in nature and not have guaranteed bandwidth.

Whatever you do with BULK transfers, you may reduce the occurrence of such scenarios but it is not avoidable.

You may want to go and use ISO or INT transfers based on you application requirement.

And also, if you are playing with the buffer where you store the data then it is better to Queue the requests and use ping-pong buffers to eliminate any occurrence of that scenario. But I think if you are using ISO then automatically it will be taken care of on the PC side.

 

Thanks,

sai krishna.






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.