1 Reply Latest reply on Aug 3, 2016 1:28 PM by Madhu Lakshmipathy

    CyU3PDmaChannelCreate SPI CY_U3P_DMA_TYPE_AUTO mode failure

    angelos.spanos_1775031

      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(         &glSpiTxHandle,         CY_U3P_DMA_TYPE_AUTO,         &dmaConfig     );
         

      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?