6 Replies Latest reply on May 15, 2019 9:29 AM by JuCh_3556216

    SPI Transaction with Auto DMA

    JuCh_3556216

      Hi,

       

      I've successfully configured and tested a SPI DMA producer to pass data from the SPI producer to a USB socket for consumption. That DMA is currently configured like this:

       

      //Configure DMA for real time streaming channel
      CyU3PDmaChannelConfig_t dmaConfig;
      dmaConfig.size = 1024;
      dmaConfig.count = 64;
      dmaConfig.prodSckId = CY_U3P_LPP_SOCKET_SPI_PROD;
      dmaConfig.consSckId = CY_U3P_UIB_SOCKET_CONS_1;
      dmaConfig.dmaMode = CY_U3P_DMA_MODE_BYTE;
      
      //Disable DMA callbacks
      dmaConfig.prodHeader     = 0;
      dmaConfig.prodFooter     = 0;
      dmaConfig.consHeader     = 0;
      dmaConfig.notification   = 0;
      dmaConfig.cb             = NULL;
      dmaConfig.prodAvailCount = 0;
      
      status = CyU3PDmaChannelCreate(&StreamingChannel, CY_U3P_DMA_TYPE_AUTO, &dmaConfig)
      
      
      

       

      With its current configuration, the DMA doesn't transmit anything (except 0x0000) when streaming. Is there a way to set up another DMA that transmits data stored in memory on the CPU while simultaneously transmitting the data acquired during the transaction over USB?

       

      My code can be found in the BurstMode branch of this repository.

       

      Thanks for your help!