Announcements

Industry-first USB 10Gbps device controller. Check it out now!

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

cross mob
Anuj_Shanbhag12
Level 1
Level 1
10 sign-ins First like given 5 sign-ins

Hello,

I have been using the FX3 example code SlaveFifoSync provided for 32bit GPIF interface.I have a doubt regarding the DMA buffer count and DMA buffer size. In the example design, the header file cyfxslfifosync.h is assigning CY_FX_SLFIFO_DMA_BUF_COUNT to 2 by default per channel and in the main file cyfxslfifosync.c, DMA Buffer size is based on the USB speed(1024 for Super speed). 

Anuj_Shanbhag12_1-1711958529262.png

Anuj_Shanbhag12_2-1711958668210.png

This configuration works fine and I am able to transfer 1024 bytes. Now, I want to change the DMA buffer size to 2KB or more and confused as to which parameters to modify. 

Anuj_Shanbhag12_0-1711971202773.png

 

Anuj_Shanbhag12_3-1711958801667.png

Regards,

Anuj

0 Likes
1 Solution
MallikaK_22
Moderator
Moderator
Moderator
50 likes received 750 replies posted 250 solutions authored

Hi Anuj,

No, since you want to change the size of DMA buffer only, you only need to set dmaCfg.size parameter to your required value. Endpoints size can be left as it is.

You may refer to this KBA also: https://community.infineon.com/t5/Knowledge-Base-Articles/DMA-buffer-count-and-size-allocation-in-EZ...

Regards,

Mallika

View solution in original post

3 Replies
MallikaK_22
Moderator
Moderator
Moderator
50 likes received 750 replies posted 250 solutions authored

Hi,

It is recommended to keep the endpoint size in compliance with the USB spec i.e. 1024 for SS.

The DMA buffer size can be kept as a multiple of EP size.

The endpoint configuration should be same in both the main code and descriptor file.

Regards,

Mallika

Hello Mallika,

                           Thanks for clearing the doubt.  But I wanted to know which parameters to modify. I found in a couple of threads that epCfg.burstLen paramter should be changed and dmaCfg.size parameter should be size*epCfg.burstLen. Is this correct?

Regardds,

Anuj

0 Likes
MallikaK_22
Moderator
Moderator
Moderator
50 likes received 750 replies posted 250 solutions authored

Hi Anuj,

No, since you want to change the size of DMA buffer only, you only need to set dmaCfg.size parameter to your required value. Endpoints size can be left as it is.

You may refer to this KBA also: https://community.infineon.com/t5/Knowledge-Base-Articles/DMA-buffer-count-and-size-allocation-in-EZ...

Regards,

Mallika