You are here

CyU3PDmaChannelCreate SPI CY_U3P_DMA_TYPE_AUTO mode failure | Cypress Semiconductor

CyU3PDmaChannelCreate SPI CY_U3P_DMA_TYPE_AUTO mode failure

Summary: 1 Reply, Latest post by Madhu Sudhan on 03 Aug 2016 01:28 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.

Hi All,

I try to create an automatic DMA channel with SPI as the consumer. This is how I go about doing this:

    CyU3PMemSet((uint8_t *)&dmaConfig, 0, sizeof(dmaConfig));                                                                                                                                                                                 
    dmaConfig.size = pageLen;
    dmaConfig.count          = 0;
    dmaConfig.prodAvailCount = 0;
    dmaConfig.dmaMode        = CY_U3P_DMA_MODE_BYTE;
    dmaConfig.prodHeader     = 0;
    dmaConfig.prodFooter     = 0;
    dmaConfig.consHeader     = 0;
    dmaConfig.notification   = 0;
    dmaConfig.cb             = NULL;

    /* Channel to write to SPI flash. */
    dmaConfig.prodSckId =  CY_U3P_UIB_SOCKET_PROD_1;
    dmaConfig.consSckId = CY_U3P_LPP_SOCKET_SPI_CONS;
    status = CyU3PDmaChannelCreate(

The execution of CyU3PDmaChannelCreate is not succesful.

If CY_U3P_UIB_SOCKET_PROD_1 is replaced with CY_U3P_CPU_SOCKET_PROD and CY_U3P_DMA_TYPE_AUTO is replaced with CY_U3P_DMA_TYPE_MANUAL_OUT then the function succeeds.

Do you understand what I am doing wrong?

mady's picture
Cypress Employee
963 posts

Please check the error code returned by the DmaChannelCreate API and refer the API guide on what it means. Also, please check if CY_U3P_UIB_SOCKET_PROD_1 is already used by any other Dma Channel in your firmware.


- Madhu Sudhan

Log in to post new comments.