2 Replies Latest reply on Nov 5, 2012 10:32 AM by user_201293159

    C++ CYAPI Library XferData() timing

    user_201293159

      I've written a simple console application that excercises my slave fifo design. As a test I do a single packet bulkin from one endpoint in my FPGA and then burst bulkin 16 packets from another endpoint in the FPGA. I do this 8 times in a for loop. So I know that XferData() does synchronous IO and once called doens't return until the transfer is completed. My FPGA puts out a signal that indicates whenever it is transferring data between the FX3 and itself. I see consistant periods of activity that shows how long each endpoint is actively transferring data, about 2.5 us for EP2 and about 41 us for EP1 which I know to be correct. So here is the mystery that I'm unable to solve. Sometimes XferData() will take 160 us or so to return and sometimes it will take 500+ us to return. The length of time is NOT dependent on how much data is being transferred; it's usually the same regardless of the endpoint and either short or long for both. Sometimes, the first 5 XferData() pairs will be really long and the last 3 will be around 200 us. I'm getting widely varying data rates and have no clue as to what's causing it. Anyone have ideas?