Hi,
I am trying to have DMA servicing the SPI port on the ARM side during uboot. I have it configured so that I have one DMA handling the TX and another one dealing with the RX. The data received is moved to external DDR. In term of priority, I have the tx assigned to queue 1 instead of queue 0 so it is lower priority then the RX. I have also changed the transfer controller's prioity so TC1 is lower priority than TC0.
So with these setup, most of the time it works. But occasionally, the RX DMA will not service the SPI RX on time at the very beginning so it drops the second byte but nothing after. (The first byte is okay since the SPI buffer is free and it always have room to go to). It seems to me that there are times that the DMA is slow to response to the RX event so the SPI overuns. As far as prioriy settings, I believe I have done all that I can. So do any of you have any idea why I am seeing this problem? I see this problem even with SPI clock speed at 20MHz, which is lower that the maximum clock speed supported by the peripheral.
Thanks,
Charles