1 Reply Latest reply on Jun 8, 2012 1:01 AM by userc_39074

    Increase data transfers on FX2 using two IN EPs in parallel

      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.





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

           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.     








          sai krishna.