1 Reply Latest reply on Jan 26, 2017 11:04 PM by userc_38501

    AUTO DMA Channel for SPI to USB





      Can I have an infinite transfer AUTO DMA channel from SPI to USB end point. Is it possible to make the transmission happen only if fixed number of bytes got received from SPI each time?


      Any example source code to evaluate?

        • 1. Re: AUTO DMA Channel for SPI to USB



          I have modified the functionality of USB-UART example to get SPI data to CPU and then from CPU to USB. Here, the modified code is working but I am seeing a serious problem of significant gaps between SPI clocks. The SPI to CPU is with DMA Manual IN.  My SPI data is actually the audio from an I2S to SPI converter logic. Since the clock is discontinuous for a significant amount of time the audio gets suffered.


          Please advise me for the following things.


          1) Infinite transfer of SPI data directly to USB (So clock wont have any discontinuity). This will help to avoid CPU intervention.


          2) If the SPI data is audio data, can I still use the infinite way of transferring. Or, does it require buffering of data and sent as frame always?


          Following is the producers-consumers used


          #define CY_FX_EP_CONSUMER1_SOCKET        CY_U3P_UIB_SOCKET_CONS_2