Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Transfer "Data Produced by CPU" and "Data in the SlaveFifo" via the Same Endpoint

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Transfer "Data Produced by CPU" and "Data in the SlaveFifo" via the Same Endpoint
Moderator:
RSKV

Post Reply
Follow this topic



Transfer "Data Produced by CPU" and "Data in the SlaveFifo" via the Same Endpoint

_Gary_ posted on 11 Apr 2012 5:08 AM PST
Senior Member
14 Forum Posts

 I would like to transfer "Data Produced by CPU" and "Data in the SlaveFifo" via the same Endpoint (e.g. Bulk IN EP2)

Is there any way to implement this?

 

Any information about this would be appreciated.

Gary




Re: Transfer "Data Produced by CPU" and "Data in the SlaveFifo" via the Same Endpoint

_Gary_ posted on 12 Apr 2012 11:31 PM PST
Senior Member
14 Forum Posts

I tried to modify cyfxbulklpmanmanytoone.

However, It seems that you can create a DMA MultiChannel of "many UIB or PIB to one UIB"

but you can NOT create a DMA MultiChannel of  "UIB or PIB + CPU to one UIB"

Is it really a limitation? Or there is something wrong with my DMA channel configuration?

 

Here is my code and results:

CASE 1 - Create DMA MultiChannel Success: PIB + UIB to one UIB

    /* Create a DMA MANUAL_MANY_TO_ONE channel between

     * the producer and consumer sockets of the U port.

     * DMA size is set based on the USB speed. */

    dmaCfg_multi.size  = size;

    dmaCfg_multi.count = CY_FX_BULKLP_DMA_BUF_COUNT;

    dmaCfg_multi.validSckCount = 2;

    dmaCfg_multi.prodSckId[0] = CY_U3P_PIB_SOCKET_0;

    dmaCfg_multi.prodSckId[1] = CY_U3P_UIB_SOCKET_PROD_1;

    //dmaCfg_multi.prodSckId[1] = CY_U3P_CPU_SOCKET_PROD;

    dmaCfg_multi.consSckId[0] = CY_U3P_UIB_SOCKET_CONS_2;

    dmaCfg_multi.dmaMode = CY_U3P_DMA_MODE_BYTE;

    dmaCfg_multi.notification = CY_U3P_DMA_CB_PROD_EVENT;

    dmaCfg_multi.cb = CyFxBulkLpDmaCallback;

    dmaCfg_multi.prodHeader = 0;

    dmaCfg_multi.prodFooter = 0;

    dmaCfg_multi.consHeader = 0;

    dmaCfg_multi.prodAvailCount = 0;

 

    apiRetStatus = CyU3PDmaMultiChannelCreate (&glChHandleBulkLp,

            CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE, &dmaCfg_multi);

 

 

CASE 2 - Create DMA MultiChannel Fail: UIB + CPU to one UIB => Debug message: CyU3PDmaMultiChannelCreate failed, Error code = 64

    /* Create a DMA MANUAL_MANY_TO_ONE channel between

     * the producer and consumer sockets of the U port.

     * DMA size is set based on the USB speed. */

    dmaCfg_multi.size  = size;

    dmaCfg_multi.count = CY_FX_BULKLP_DMA_BUF_COUNT;

    dmaCfg_multi.validSckCount = 2;

    dmaCfg_multi.prodSckId[0] = CY_U3P_PIB_SOCKET_0;

    //dmaCfg_multi.prodSckId[1] = CY_U3P_UIB_SOCKET_PROD_1;

    dmaCfg_multi.prodSckId[1] = CY_U3P_CPU_SOCKET_PROD;

    dmaCfg_multi.consSckId[0] = CY_U3P_UIB_SOCKET_CONS_2;

    dmaCfg_multi.dmaMode = CY_U3P_DMA_MODE_BYTE;

    dmaCfg_multi.notification = CY_U3P_DMA_CB_PROD_EVENT;

    dmaCfg_multi.cb = CyFxBulkLpDmaCallback;

    dmaCfg_multi.prodHeader = 0;

    dmaCfg_multi.prodFooter = 0;

    dmaCfg_multi.consHeader = 0;

    dmaCfg_multi.prodAvailCount = 0;

 

    apiRetStatus = CyU3PDmaMultiChannelCreate (&glChHandleBulkLp,

            CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE, &dmaCfg_multi);

 



Re: Transfer "Data Produced by CPU" and "Data in the SlaveFifo" via the Same Endpoint

Poturaju posted on 11 May 2012 04:53 AM PST
Top Contributor
26 Forum Posts

Hi Gary,

In your project, you have configured Multi DMA channel in two ways

In case 1 PIB + UIB producer sockets and in case 2 PIB + CPU producer sockets to one UIB consumer sockets. Are these configurations working?

and have you ever tried two PIB producer sockets to one UIB consumer sockets?

Thanks,

Subbarao.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.