2 Replies Latest reply on Jan 3, 2017 8:36 PM by ranliang_2216111

    Bulk transfer fail on GPIF master mode


      Hi all


      we encounter bulk transfer problems with the FX3 when the DMA buffer.


      We are working with the FX3 controller in master mode and are trying transfer data from the PC to FPGA in bulk transfers(8MB) using DMA.When the ready_to_transfer signal from FPGA is high the GPIF state machine DR_DATA from USB socket to the PIB socket.The DMA transfer Mode is CY_U3P_DMA_MODE_BYTE the transfer type is CY_U3P_DMA_TYPE_AUTO and the buffer is two 45kBytes.The burst length of pipeout endpoint is 15.The software works with the winusb dll and repeated WinUsb_WritePipe() on one bulk-out SS endpoint. The timeout time of Pipeout is setting to 5s.The Host Controller is Inter and ASMedia.


      When the ready_to_transfer signal from FPGA is setting to '1' the GPIF state machine works properly and the data to the fpga is correct.But when the ready_to_transfer signal is connecting to the FPGA FIFO's valid port (which may be low when FIFO is full) the transfer is timeout everytime on Inter Host Controller PC and the ASMedia PC is fine.


      The transfer timeout is caused by DMA_RDY_TH2 is not available anymore when transfered 45kBytes integer times data already.
      Reduce the PIB clock frequency will also cause this problem when the ready_to_transfer signal is setting to '1'.


      Thougts & Questions: 
      It feels the speed of consuming DMA buffer reduced cause this problem.
      Is there anyother setting when using winusb api to write the pipe?


      Thank you in advance,


      Ran Liang

        • 1. Re: Bulk transfer fail on GPIF master mode

          Hi Ran,


          Do you face this issue when you used the cyusb for data transfer instead of winusb? This is is just to narrow down the issue as this seems more to be Host specific.




          -Madhu Sudhan

          • 2. Re: Bulk transfer fail on GPIF master mode

            Hi Madhu,


            Yes,I also feel that the problem is caused by the host.


            I used the source code of AN87216 and modified GPIF state machine and found that when the DMA buffer size increases after the problem reproduce.the intel usb 3.0 host driver is the latest official version.


            The other APIs are already in place so we can not replace winusb.


            The impact of this problem is very large must be resolved.Could you give us some advice?




            -Ran Liang