FX3 transmission rate | Cypress Semiconductor
FX3 transmission rate
dmaCfg.size = (usbSpeed == CY_U3P_SUPER_SPEED) ? (size * CY_FX_EP_BURST_LENGTH) : (size);
dmaCfg.count = CY_FX_BULKSRCSINK_DMA_BUF_COUNT;
dmaCfg.prodSckId = CY_FX_EP_PRODUCER_SOCKET;
dmaCfg.consSckId = CY_U3P_CPU_SOCKET_CONS;
dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT;
dmaCfg.cb = CyFxBulkSrcSinkDmaCallback;
As you can see, I can manipulate the size (where the "size" identifier in the compact "if" statement is the packet size chosen according to the USB speed) and count fields to obtain different performances. Here on the forum I read that the size of DMA buffer can grow up to 64k, but any value I replace the right side of dmaCfg.size assignment with doesn't work (it lets me compile but fails programming the device by the control center). The default value of CY_FX_BULKSRCSINK_DMA_BUF_COUNT is 8, with which I obtain a transfer rate of about 10MBps. Raising it to 252 (but not any further, cause it doesn't work) changes the transfer rate to about 14MBps.
Using the CyFxBulkLpAuto example I could reach a transfer rate of 40MBps. Can you tell me why it goes so slow, even if the transfer is one-side only?
p.s. as software application I'm using the default visual studio cpp application provided.