End point Buffer size.

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

cross mob
ThM_3776866
Level 4
Level 4
First like received First like given Welcome!

Hi all,

I am working on cypress FX-3, I have 2 end USB end point.

Q1. what is the maximum buffer size of single end point ?

Q2. Where we will set end point buffer size ?

Thank you.

Best regards,

Thrimurthi M

srntabgaprbd

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello Thrimurthi,

- I understand that you are using USB sockets in a DMA channel. In that case, the buffer size for the USB sockets are defined in the CyU3PDmaChannelCreate() API parameters.

Code Snippet

      dmaCfg.size = 1024;

    dmaCfg.count = 8;

    dmaCfg.prodSckId = CY_FX_EP_PRODUCER_SOCKET;

    dmaCfg.consSckId = CY_FX_EP_CONSUMER_SOCKET;

    dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;

    dmaCfg.notification = 0;

    dmaCfg.cb = NULL;

    dmaCfg.prodHeader = 0;

    dmaCfg.prodFooter = 0;

    dmaCfg.consHeader = 0;

    dmaCfg.prodAvailCount = 0;

    apiRetStatus = CyU3PDmaChannelCreate (&glChHandleBulkLp,

            CY_U3P_DMA_TYPE_AUTO, &dmaCfg);

The DMA buffer size depends on the FX3 part number that is being used. In case you are using a 512kB SRAM FX3 silicon, 224kB of memory is allocated for DMA buffers whereas in a 256kB SRAM FX3 silicon, the DMA buffer size is 32kB. These definitions can be found in the cyfxtx.c file.

Best regards,

Srinath S

View solution in original post

0 Likes
4 Replies
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello Thrimurthi,

- I understand that you are using USB sockets in a DMA channel. In that case, the buffer size for the USB sockets are defined in the CyU3PDmaChannelCreate() API parameters.

Code Snippet

      dmaCfg.size = 1024;

    dmaCfg.count = 8;

    dmaCfg.prodSckId = CY_FX_EP_PRODUCER_SOCKET;

    dmaCfg.consSckId = CY_FX_EP_CONSUMER_SOCKET;

    dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;

    dmaCfg.notification = 0;

    dmaCfg.cb = NULL;

    dmaCfg.prodHeader = 0;

    dmaCfg.prodFooter = 0;

    dmaCfg.consHeader = 0;

    dmaCfg.prodAvailCount = 0;

    apiRetStatus = CyU3PDmaChannelCreate (&glChHandleBulkLp,

            CY_U3P_DMA_TYPE_AUTO, &dmaCfg);

The DMA buffer size depends on the FX3 part number that is being used. In case you are using a 512kB SRAM FX3 silicon, 224kB of memory is allocated for DMA buffers whereas in a 256kB SRAM FX3 silicon, the DMA buffer size is 32kB. These definitions can be found in the cyfxtx.c file.

Best regards,

Srinath S

0 Likes

Thanks for reply..

Which means USB 3.0 can be process 1024 bytes at time?

0 Likes

Hello Thrimurthi,

Yes, USB 3.0 bulk endpoints can transfer 1024 bytes per transaction and can even have burst up to 16 transactions.

Best regards,

Srinath S

0 Likes
ThM_3776866
Level 4
Level 4
First like received First like given Welcome!

Thank you sir.

0 Likes