1 Reply Latest reply on Jun 1, 2018 5:59 AM by hman

    FX3: Commit DMA buffer outside DMA callback function

    jameswagner

      Hi all,

       

      In my system I have a MANUAL DMA channel from USB to GPIF.

       

      The frames coming in through the USB producer need to be re-clocked. To achieve this we want to:

       

           1. First store the DMA transfer buffers for a few milliseconds. (Not committing to GPIF)

           2. Set up a GPIO interrupt, triggered from an external input, which occurs every 125us. Register GPIO_Interrupt(uint8_t gpioId); to gpio block.

           3. Use CyU3PDmaChannelCommitBuffer(); inside GPIO_Interrupt(); to release a transfer buffer every 125us:

       

                GPIO_Interrupt(uint8_t gpioId)

                {

                     status = CyU3PDmaChannelCommitBuffer(&handle, count, 0);

                }

       

          

      I'm currently getting an error code: CY_U3P_ERROR_MUTEX_FAILURE,         /**< Failed to get a mutex. */

       

      Questions:

           1. Is it possible to commit buffers in a DMA channel outside of the DMA channel callback function?

           2. Is this the correct configuration to 're-clock' incoming traffic through the DMA channel?

       

       

      Thanks,

      James