AnsweredAssumed Answered

SPORT RX DMA

Question asked by Alexander on May 5, 2011
Latest reply on May 5, 2011 by Alexander

Hi,

While trying to familiarize myself with a BF527 EZ-KIT board i wrote a simple (at least i thought it would be) code, which performs SPORT RX DMA transfers from the codec to the internal memory in the single buffer (stop) mode.

After configuring SPORT in receive mode

*pSPORT0_RCR1=0x6410;
*pSPORT0_RCR2=0x001f;

and setting up IVG9 and IVG12 handlers i invoke IVG12 interrupt by pressing PB1 button and set up the DMA channel like this

*pDMA3_X_COUNT=sizeof(receive_buf)/4;
*pDMA3_START_ADDR=(void*)&receive_buf[0];
*pDMA3_CONFIG=0x008B;

And finally i enable SPORT0 operation in receive mode and wait for the DMA completion interrupt.

But after the first 32-bit word is written into memory the DMA controller asserts DMA_ERR and aborts operation.

Can you explain what is wrong with my algorithm. I have read the part of the HRM that explains DMA errors but still it is unclear what am i doing wrong.

Outcomes