|
hi
I have solve the problem,It is leaded by the DMA size .The fallowing is the source code:
dmaSlFifoConfig.size = size * 16;
dmaSlFifoConfig.count = CY_FX_SLFIFO_DMA_BUF_COUNT;
dmaSlFifoConfig.prodSckId = (CyU3PDmaSocketId_t)(CY_FX_EP_PRODUCER_PPORT_SOCKET);
dmaSlFifoConfig.consSckId = (CyU3PDmaSocketId_t)(CY_U3P_UIB_SOCKET_CONS_0 | CY_FX_EP_CONSUMER_USB_SOCKET);
dmaSlFifoConfig.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaSlFifoConfig.notification = 0;//CY_U3P_DMA_CB_PROD_EVENT;
// dmaSlFifoConfig.cb = CyFxSlFifoPtoUDmaCallback
dmaSlFifoConfig.cb = NULL;
dmaSlFifoConfig.prodHeader = 0;
dmaSlFifoConfig.prodFooter = 0;
dmaSlFifoConfig.consHeader = 0;
dmaSlFifoConfig.prodAvailCount = 0;
/* Create the channel */
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleSlFifoPtoU,
CY_U3P_DMA_TYPE_AUTO,
&dmaSlFifoConfig);
the first line dmaSlFifoConfig.size = size * 16;the size is base on the usb speed.In order to increace the transfer speed I make the size bigger (*16).And just the (*16) lead the problem.Remove the (*16) and then it work well.But I have hesitation ,why the DMA size can affect the transfer and it is just in V1.1.1and v1.2. External FPGA write data to the buffer ,when the buffer is full then the data will be commit to PC .If the data size is smaller than the DMA size ,External FPGA will commit the data by PKEND single. Am i right? So i think the buffer size could't affect the transfer. SO can you help me to know the reason .I am hurry it
Best Regards
jia decun
|