AnsweredAssumed Answered

i.MX6Q eCSPI RXFIFO overflow while DMA transfermation

Question asked by huang dexiang on Aug 5, 2014

We are developping a device based on IMX6Q. We use SPI interface(working as SLAVE mode) to communicate with other devices. The driver of CSPI in the BSP(L3.0.35_4.1.0_130816) does not support DMA transfer, so we write a driver that support DMA. The driver can read data from SPI directory from the driver. To test the driver We also write a test program that receive data from SPI and save in an TF card,but we found that the SPI will overflow.

Attached are the source code of the driver and the test program.

When running the program,  the callback function (spidev_rxdma_callback() in the driver) will usually report RXFIFO overflowed. Compare the recevied data with the source data,we found that there will always be some data missed.

BTW,  We also used the same kind driver in i.MX31, and It didn't overflow .

Can anyone give me some tips about how to fix it?

Original Attachment has been moved to: driver.rar

Original Attachment has been moved to: test.rar

Outcomes