Time between transfers

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 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,

0 Likes
5 Replies
Anonymous
Not applicable

Hi,

   

What APIs are you using to do this read?

   

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

   

Regards,

   

Anand

0 Likes
Anonymous
Not applicable

Hello Anan,

   

XferData() function.

   

Regards,

   

Israel

0 Likes
Anonymous
Not applicable

 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

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

 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

0 Likes