0 Replies Latest reply on Aug 18, 2017 1:29 PM by miaozhou_1499856

    FX3 DMA

    miaozhou_1499856

      Hi, I transmit data from GPIF to USB3 and DMA type is many to one. The DMA configutation is as follows:

         

          /* Create a DMA Manual channel for sending the video data to the USB host. */
          dmaMultiConfig.size           = CY_FX_UVC_STREAM_BUF_SIZE;
          dmaMultiConfig.count          = CY_FX_UVC_STREAM_BUF_COUNT;
          dmaMultiConfig.validSckCount  = 2;
          dmaMultiConfig.prodSckId [0]  = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_0;
          dmaMultiConfig.prodSckId [1]  = (CyU3PDmaSocketId_t)CY_U3P_PIB_SOCKET_1;
          dmaMultiConfig.consSckId [0]  = (CyU3PDmaSocketId_t)(CY_U3P_UIB_SOCKET_CONS_0 | CY_FX_EP_VIDEO_CONS_SOCKET);
          dmaMultiConfig.prodAvailCount = 0;
          dmaMultiConfig.prodHeader     = 12;                 /* 12 byte UVC header to be added. */
          dmaMultiConfig.prodFooter     = 4;                  /* 4 byte footer to compensate for the 12 byte header. */
          dmaMultiConfig.consHeader     = 0;
          dmaMultiConfig.dmaMode        = CY_U3P_DMA_MODE_BYTE;
          dmaMultiConfig.notification   = CY_U3P_DMA_CB_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT;
          dmaMultiConfig.cb             = CyFxUvcApplnDmaCallback;
          apiRetStatus = CyU3PDmaMultiChannelCreate (&glChHandleUVCStream, CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE,
                  &dmaMultiConfig);
          if (apiRetStatus != CY_U3P_SUCCESS)
          {
              /* Error handling */
              CyU3PDebugPrint (4, "DMA Channel Creation Failed, Error Code = %d\n", apiRetStatus);
              CyFxAppErrorHandler (apiRetStatus);
          }

         

      But now, I need to transmit the two streamings to the host by two endpoints of USB: endpoint1 and endpoint3. The above code just use the endpoint3 as the consumer. Can I add a consumer (endpoint 1) to form many to many DMA type??? How to configure the DMA  and transmit the data to the two endpoint?