2 Replies Latest reply on Feb 1, 2016 2:16 AM by anri.gibon

    USB FX3 DMA AUTO USB to SPI

    anri.gibon

      Hi, i am using CYUSB3014. Сan I configure AUTO DMA channel  between USB endpoint and SPI?

         

      Thanks!

        • 1. Re: USB FX3 DMA AUTO USB to SPI
          Madhu Lakshmipathy

          Hi,

             

          Yes. You can create an auto channel between USB Endpoint and SPI Interface, just like any other DMA Channel.

             

          Regards,

             

          - Madhu Sudhan

          • 2. Re: USB FX3 DMA AUTO USB to SPI
            anri.gibon
                    I set up spi , konfiguriere endpoint and creates a dma connection. Usb data will be sent, but only 4 times, 5 an error is returned. Output spi nothing. What could be the problem ? Thanks. //_______________________________________________________ CyU3PMemSet ((uint8_t *)&spiConfig, 0, sizeof(spiConfig)); spiConfig.isLsbFirst = CyTrue; spiConfig.cpol = CyFalse; spiConfig.ssnPol = CyFalse; spiConfig.cpha = CyTrue; spiConfig.leadTime = CY_U3P_SPI_SSN_LAG_LEAD_HALF_CLK; spiConfig.lagTime = CY_U3P_SPI_SSN_LAG_LEAD_HALF_CLK; spiConfig.ssnCtrl = CY_U3P_SPI_SSN_CTRL_HW_EACH_WORD; spiConfig.clock = 33000000; spiConfig.wordLen = wordlen; /* Start the SPI module and configure the master. */ status = CyU3PSpiInit(); CyU3PMemSet ((uint8_t *)&epCfg, 0, sizeof (epCfg)); epCfg.enable = CyTrue; epCfg.epType = CY_U3P_USB_EP_BULK; epCfg.burstLen = 1; epCfg.streams = 0; epCfg.pcktSize = 1024; status = CyU3PSetEpConfig (CY_FX_EP_PRODUCER+2, &epCfg); CyU3PUsbFlushEp(CY_FX_EP_PRODUCER+2); status = CyU3PSpiSetConfig (&spiConfig, NULL); CyU3PMemSet((uint8_t*)&dmaConfig,0,sizeof(dmaConfig)); dmaConfig.size=1024; dmaConfig.count=4; dmaConfig.prodAvailCount=0; dmaConfig.dmaMode=CY_U3P_DMA_MODE_BYTE; dmaConfig.prodHeader=0; dmaConfig.prodFooter=0; dmaConfig.consHeader=0; dmaConfig.notification=0xFF; dmaConfig.cb=cbSpiTxDma; dmaConfig.prodSckId=CY_U3P_UIB_SOCKET_PROD_3; dmaConfig.consSckId=CY_U3P_LPP_SOCKET_SPI_CONS; status=CyU3PDmaChannelCreate(&glSpiTxHandle,CY_U3P_DMA_TYPE_AUTO_SIGNAL,&dmaConfig); status=CyU3PDmaChannelSetXfer (&glSpiTxHandle, 0);