This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Struggling with McBSP and DMA



I have an application for C2000 (Delfino) that wants to receive a high-rate packet via McBSP. I want to use a DMA channel to receive the data into memory without software in the loop. I have an incoming signal that informs me before the transmission starts, so my first instinct was to go with CONTINUOUS mode off and set RUN=1 each time I receive that handshake signal.

However, the DMA channel puts the first McBSP data word at the 2nd word in RAM. It continues filling my RAM buffer in order until it gets to the end where it decide to wrap and put the last word in the 1st word of RAM. Because this is triggered by McBSP, I have BURST_SIZE=0, TRANSFER_SIZE=(PacketWords-1), and WRAP_SIZE=0xFFFF. I don't understand why the DMA is rotating my data by one word.

So, I tried an alternative solution. I turned CONTINUOUS mode on. The data does start showing up in the 1st word of RAM. Although that solves the previous issue (for no apparent reason), I run into a new problem. Occasionally the data shifts back one word in my buffer. Although I can't rule out a problem with the incoming data, I don't need to be concerned if only I could "resynchronize" the address pointers using my incoming handshake signal, but I can't find a way to affect them. The DMA just keeps marching along getting more and more out of sync. Assuming there is nothing wrong with the incoming data stream, I wonder if there is some kind of on-chip timing issue that I need to be more concerned with. I have other DMA channels running for other reasons, so my next attempt will be to use CH1 high priority mode to see if anything changes.

Any suggestions would be appreciated.