1 Reply Latest reply on Jun 13, 2016 7:04 AM by userc_40024

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

      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);
                      }
                 }
              }
          }
      }

         
          

       

         
        • 1. Re: FX3 simple test working only in USB2.0, but not in USB3.0

          Hi,

             

          I forgot to mention what I want to achieve with the code posted before, the goal is to commit a buffer in the Bulk In Endpoint not from the DMA Callback but from a thread by polling the status.

             

          By the way, I also modified the example USBBulkLoopManualInOut to make it work with the Streamer application, and the result is exactly the same as before. It works fine in USB 2.0 but not in USB 3.0. Can anyone help me, please?