Increase data transfers on FX2 using two IN EPs in parallel | Cypress Semiconductor
Increase data transfers on FX2 using two IN EPs in parallel
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.