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.
- Madhu Sudhan
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 ?
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.
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,
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.