FX3™ SuperSpeed Explorer Kit can't transfer data bigger than 65536 16bit words

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

cross mob
zeLu_283996
Level 2
Level 2
First like given

Hi,

I'm using CYUSB3KIT-003 EZ-USB® FX3™ SuperSpeed Explorer Kit.

I connect it with my FPGA board and using asynslavefifo mode. my FPGA board continues to send data  to the Kit by GPIO.  I use either control center or my c++ GUI to receive data from it.The first 65536 16bit words are correct. but after that amount, All the data keep the value of last correct 16bit word.

for example:   first word:           FC 65

                       second word:     EF 76

                        65536th:           F0 19

then, from now on, all the data change to F0 19, F0 19, F0 19.......

after an even longer time, all the data changed to 00 00, 00 00,......

I tried either small frame(everytime transfer in a small amout of bytes like 1024, 4096 or 8192 ... but frame by frame continuously), or big frame(like 65536 , 131 072 or even bigger).

The result is the same.

in the firmware, DMA transfer size is set to infinite:

#define CY_FX_SLFIFO_DMA_TX_SIZE        (0)                   /* DMA transfer size is set to infinite */

#define CY_FX_SLFIFO_DMA_RX_SIZE        (0)                   /* DMA transfer size is set to infinite */

any one can help?

Thank

Zen

0 Likes
1 Solution

Hello Zen,

Please find the snippet below which contains the code for creation of DMA channel from U Port to P Port and from P Port to U Port.

pastedImage_1.png

This can be found in the file cyfxslfifoasync.c file. Here,

The dmaCfg.size gives the buffer size associated with the DMA channel. Note that size is same for both the channels here.

The dmaCfg.count gives the number of such buffers that are allocated to the DMA channel. This is also same for both the channels.

According to the code, currently the size of the DMA buffer is set based on the USB speed. That is it is 64 bytes for Full Speed, 512 for High Speed and 1024 for super speed. You can try varying the DMA buffer size. As you might be knowing that this example project makes use of default memory mapping for the 512 KB SRAM. That is, only 224 KB out of the available 512 KB SRAM of FX3 can be used for the creation of DMA Buffers. Out of this, some amount of memory is used for the creation of Control channel and UART debug channel. So, to be on the safe side, ensure that the total size of DMA buffers allocated is less than 218 KB. If this is not met, then the device will not enumerate. So when you are increasing the DMA Buffer size, if the total size of allocated DMA buffers for both the channels go beyond 218 KB, please reduce the number of buffers or the size of DMA buffer.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
6 Replies