I am facing a very strange problem about the external port DMA.I am trying to DMA data from an ADC via an FPGA based FIFO buffer. This worked well for some time.
Now, when I initialize the DMA, I see that the DMA Status says Block Transfer Incomplete (DSTAT register value is 001 for the DMA channel of interest). I set a flag in the DMA Complete ISR and poll it in my main routine. My code stays in this loop waiting for the DMA to complete. Changing the DMA channel does not help. Sometimes, the DMA works once. But, subsequent loop for DMA transfer fails in the described way.
The TCB register has valid values when I halt the code execution. However, the DI value of the DCD block (internal memory pointer) shows the last location. Example, if I am DMAing 0x1000 values to a internal buffer at address 0x104000, I see the DI value at 0x103FFF. The DX Count value is 0.
I am working our custom board. This problem is consistent and earlier verified codes for testing DMA on the same board too are facing the same problem. Any tips? Could this be because of power supply issues with the board?