3 Replies Latest reply on Apr 11, 2016 11:23 PM by nisa

    Correct practice when implementing a command protocol using bulk endpoints

    pradeepa.senanayake

      Hello,

         

      We are in the process of upgrading the FX2 chip of our devices to FX3. We are implementing our custom command reply protocol using Bulk endpoints.

         

      Bulk OUT endpoint is for command and Bulk IN endpoint is for command reply.

         

      I have started implementation using BulkSrcSink example project.

         

      Following is the way that I have implemented command handling.

         
            
      1. In the DMA Producer callback I am copying the DMA buffer to a global buffer.
      2.     
      3. Then I fire an event to my command handler thread
      4.     
      5. That thread takes the command from the global buffer and process it
      6.     
      7. Then it commits the reply to the BulkSource channel.
      8.    
         

      Is this the correct approach? Or is there a better and an efficient approach?

         

      Thank you.