Increasing the number of 'bytes to transfer' in the control center application

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

cross mob
Anonymous
Not applicable

Hello everyone,

   

1) I wanted to know if we can change the number of "bytes to transfer" in the USB Control Center when programming a stream IN from an FPGA to my super speed explorer kit. The purpose of this question is wanting to have a transfer of exactly a certain number of bytes from the FPGA to the FX3. It happens that I want a big numbers of bytes ( exactly 12 Mega Bytes ) but the documentation specifies that I can't have more that 16 384 Bytes per transfer.

   

2) I don't understand how come the number of bytes is very little ( knowing that I test the same transfer with a PCI bus and can have up to 12 Mega bytes per transfer. It is not instantaneous so I guess they do a continuous transfer until having the wanted bytes : so I want to do the same with usb 3.0.

   

I want to create my own application where I can change the number of "bytes to transfer" each time without restarting the board every time and can have up to 12 Mega Bytes.

   

Which software is used to develop the application USB Control center and the Streamer ?? How can I increase the number of the transferred bytes : can I just do a simple loop when calling the API that does the transfer ? could you please suggest some ideas ?

   

 

   

Regards,

   

Sameh

0 Likes
5 Replies
Anonymous
Not applicable

Hi,

   

Microsoft visual studio was used to develop C# or ++ streamer and C# bases control center. 

   

A queued technique was used in the streamer app to get high data rates. The source code of both C# and C++ streamer and also C# control center are available with the FX3 SDK. The control center is only used for transferring small chunks of data at a time and please do not refer the control center's approch for transferring data.

   

Regards,

   

- Madhu Sudhan

0 Likes
Anonymous
Not applicable

Hi,

   

Thank you for the response. But what are the configurations I should make to have exactly the wanted number of the transferred bytes :

   

line 607 of the Streamer.h ( C++ Streamer ) specifies that

   

"Limit total transfer length to 4MByte

   

int maxLen = 0x400000;  //4MByte"

   

why this exact number? is it a hardware limit ?

   

thanks

0 Likes
Anonymous
Not applicable

This is beacuse 4 Mbytes is the maximum transfer size for bulk and Interrupt transfers using the CYUSB3 driver. Refer to the CYAPI programmers reference for more details. This is available with the SDK.

   

If you need a transfer size greater then this, you can queue multiple transfers as we do for the streamer application. 

0 Likes
Anonymous
Not applicable

How can I queue multiple transfers ? can you please explain further, or do you have a firmware example? should I do it it my application code or elsewhere ?

   

You say that 4 M Bytes is the maximum transfer size but I looked for the SRAM used in the EZ USB FX3 Explorer board which is a CY7C1062DV33 : 16Mbit = 2M Bytes . How come this is possible ? and if what I say is wrong , where do we store the buffers value ? what limits do we have : are they hardware, software, could we change them ourselves ??

   

and I was wondering if adding a greater SRAM could solve my problem : I want to store the values of up to 12 Mega Bytes for example in my SRAM then transfer it later for example : is this possible ?

   

I really need those answers please,

   

Thank you.

0 Likes
Anonymous
Not applicable

The 4 Mbytes limitation that I am talking about here is on the host application side. From the Host side if you want to fetch data from FX3 using the CYUSB3 driver you should do it in USB transfers and size of each transfer should not exceed 4 Mbytes. I am talking about the buffer size for Xferdata. If you wish to request more data in one transfer, then you can queue multiple BeginDataXfer() as is done in the streamer example. This is as far as the USB  communication is concerned.

   

Now for FX3, it has 512KB RAM where 256KB used for DMA buffers. The data sent by FPGA will initially be stored in DMA buffers till they are filled and then will be committed to the USB host on request. Each USB request from the host can return with a maximum of 4 MBytes of data.

0 Likes