1 Reply Latest reply on Jun 13, 2016 7:04 AM by javier.maestro_1644136

    FX3 simple test working only in USB2.0, but not in USB3.0

    javier.maestro_1644136

      Hi all,

         

      I'm working with the FX3 SuperSpeed Explorer Kit using the firmware USBBulkSourceSink (modified) and the Streamer application. The modification in the firmware only affects the file cyfxbulksrcsink.c as follows (I changed CyFxBulkSrcSinkDmaCallback and BulkSrcSinkAppThread_Entry). The problem is this code seems to work fine in USB 2.0 using the Streamer over the Bulk In Endpoint but it is not working on USB 3.0. Am I missing something?

         

      /* Callback funtion for the DMA event notification. */
      void
      CyFxBulkSrcSinkDmaCallback (
              CyU3PDmaChannel   *chHandle, /* Handle to the DMA channel. */
              CyU3PDmaCbType_t  type,      /* Callback type.             */
              CyU3PDmaCBInput_t *input)    /* Callback status.           */
      {

         

          glDataTransStarted = CyTrue;

         

      }

         

      /* Entry function for the BulkSrcSinkAppThread. */
      void
      BulkSrcSinkAppThread_Entry (
              uint32_t input)
      {
          CyU3PDmaBuffer_t buf_p;
          CyU3PReturnStatus_t status;

         

          /* Initialize the debug module */
          CyFxBulkSrcSinkApplnDebugInit();
          CyU3PDebugPrint (1, "\n\ndebug initialized\r\n");

         

          /* Initialize the application */
          CyFxBulkSrcSinkApplnInit();

         

          for (;;){
             if(glIsApplnActive == CyTrue){

         

                 /* Wait for a free buffer. */
                 status = CyU3PDmaChannelGetBuffer (&glChHandleBulkSrc, &buf_p,  CYU3P_NO_WAIT);
                 if (status == CY_U3P_SUCCESS){

         

                      // Commit output data
                      status = CyU3PDmaChannelCommitBuffer (&glChHandleBulkSrc, buf_p.size, 0);
                      if (status != CY_U3P_SUCCESS){
                             CyU3PDebugPrint(4, "CyU3PDmaChannelCommitBuffer failed, Error code = %d\n", status);
                      }
                 }
              }
          }
      }