GpifToUsb example Use Multi DMA | Cypress Semiconductor
GpifToUsb example Use Multi DMA
Reference AN75779, modify the SDK GpifToUsb example.
GPIFII wave design uses AN75779 in,
Modify the Data bus witdh: 32,
Modify the LD_DATA_COUNT / LD_ADDR_COUNT the Counter limit value: 4095 (DMA config prodHeader / prodFooter 0)
CY_FX_DMA_BUF_SIZE = 16 * 1024;
CY_FX_DMA_BUF_COUNT = 4;
Reference UVC.c content, modify cyfxgpiftousb.c, mostly on the part of the DMA transfer.
FPGA simulation COMS Image Sensor continuously send data to the GPIF.
pclk = 12.5M,
Data witdh = 32
FV LV high. A total length of the effective data 307200. (307200 * 4 bytes)
nlen = 307200 * 4;
BeginDataXfer (pBuf, nLen, &inOvLap);
WaitForXfer (&inOvLap, 5000);
Check the data found that only receive 128K bytes correct data. Equal to 16K*8
CY_FX_DMA_BUF_COUNT = 3
Check the data found that only receive 96K bytes correct data. Equal to 16K*6
Why host only received data length is the size of all DMA buffer,
CY_FX_DMA_BUF_SIZE * CY_FX_DMA_BUF_COUNT * 2