cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

New Contributor II

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
Reply
1 Solution
Moderator
Moderator

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
Reply
4 Replies
Moderator
Moderator

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
Reply
New Contributor II

Thanks for reply..

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

0 Likes
Reply
Moderator
Moderator

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
Reply
New Contributor II

Thank you sir.

0 Likes
Reply