1 Reply Latest reply on May 27, 2013 7:01 PM by alex.roscoe

    Maximizing XferData,  currently hitting 291MB/s over gpif

    alex.roscoe
              I am transferring data over the GPIF in 32 bit mode with Auto DMA and I am having trouble hitting the theoretical maximum(380MB/s) and I am also missing data on short transfers. I found that if I transferred 4*16384 bytes with a 5ms timeout I maxed out at 291 MB/s. When I do tiny bursty data around 2 MBs in length, I end up missing data. I find that it I can do complete transfers with a 10 ms time out. Am I using this time out value right? It would make sense to me that it would work very fast with longer timeouts. It doesnt work at all if I set it to default timeout of 10 seconds. Here is my code below. static void Main(string[] args) { int packets = 4, pklen = 16384 * packets, len = pklen,; double transfer = 0; byte[] buffer = new byte[pklen]; usbDevices = new USBDeviceList(CyConst.DEVICES_CYUSB); MyDevice = usbDevices[0x04B4, 0x00F1] as CyUSBDevice; curEndpt = MyDevice.USBCfgs[0].Interfaces[0].EndPoints[1] as CyUSBEndPoint; bulkEpt = curEndpt as CyBulkEndPoint; MyDevice.USBCfgs[0].Interfaces[0].EndPoints[1].TimeOut = 10; // 10 ms while(true) { if (bulkEpt.XferData(ref buffer, ref len)) { transfer += len; Console.WriteLine(transfer.ToString()); } len = pklen; } }