3 Replies Latest reply on Mar 28, 2018 5:21 AM by HemanthR_06

    End point buffer size in firmware



      How to check end point buffer size in fx3s firmware(eg:fx3 slavefifo example)?


      thank you.

        • 1. Re: End point buffer size in firmware

          Hi Geetha,


          FX3 has circular buffer of 16 x 1KB holding the last packets bursted out in super speed mode. But this is used when retry is performed by the Host.

          But the transfer of packets happens on the USB bus as per the wMaxPacketSize of the corresponding Endpoint (which can be referred in USB Specification)


          Are you looking for the same data? Please comment if not.




          1 of 1 people found this helpful
          • 2. Re: End point buffer size in firmware

            hello hemanth,

            actually i wanted to add one more endpoint to fx3 slavefifo,endpoints are defined in cyfxslfifousbdscr.c,but i am not getting how to add?any sequence steps to add consumer enpoint?

            thank you

            • 3. Re: End point buffer size in firmware

              Hello Geetha,


              Here is the way to configure a new endpoint: (Here one FX3 SDK example project is taken as reference)


              Please refer to cyfxbulkdscr.c file in the following example for the steps mentioned


              C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxbulksrcsink




              In the interface descriptor, there is a field for mentioning number of endpoints.

              This specifies the number of endpoints for your application.

              Change this for the number necessary.

              In the above referred example there are two endpoints.




              There are Endpoint descriptor and Super speed endpoint companion descriptor for both the endpoints.

              You need to add these two descriptors for every endpoint.

              In the referred example those are added for 1 producer and one consumer endpoint.



              3. In the cyfxbulksrcsink.c, refer to the following:



              /* Producer endpoint configuration */

                  apiRetStatus = CyU3PSetEpConfig(CY_FX_EP_PRODUCER, &epCfg);

                  if (apiRetStatus != CY_U3P_SUCCESS)


                      CyU3PDebugPrint (4, "CyU3PSetEpConfig failed, Error code = %d\n", apiRetStatus);

                      CyFxAppErrorHandler (apiRetStatus);



              The above function CyU3PSetEpConfig() needs to be called for every endpoint mentionedin the




              Here CY_FX_EP_PRODUCER the endpoint number and direction. Refer to the example for the macro




              Make necessary changes for epCfg Structure before calling CyU3PSetEpConfig() API.



              4. Whenever you use this endpoint as a socket in DMA channel, then your endpoint is mapped as shown below:

              dmaCfg.prodSckId = CY_FX_EP_PRODUCER_SOCKET;





              #define CY_FX_EP_PRODUCER_SOCKET        CY_U3P_UIB_SOCKET_PROD_1    /* Socket 1 is producer */



              Note: Here is where the socket is mapped to right endpoint.




              1 of 1 people found this helpful