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.

About how to configure McASP Tx DMA

Other Parts Discussed in Thread: TMS320C6745

Hi all,

In one audio product, we have 2 audio input channels L&R, and 5 audio output channels including L&R, LS&RS, and bass. And we use 4 AXR0[n] pins, 1 for input, and 3 for output. 

In “TMS320C6745_C6747 DSP Technical Reference Manual.pdf” P1016 there is one sentence I don’t understand, which is highlighted in red circle. It says “the DMA/CPU should write to XBUF DMA port address four times with data for serializers 0, 4, 5, and 7”. I don’t quite know what does “four times” mean since there is one DMA event each time, and all data is transferred at once. How to write data “four times” as it states?

  

My understanding is that on each Tx DMA event, I should write 3 words data to DMA port once time. That’s all. I couldn’t imagine how to write data four times.

In a snapshot below, we can see McASP 0 data ranges from 0x01D0 2000 – 0x01D0 2FFF, 4KB size. Does it mean we should put all serializers data within the 4K memory space? And for DMA operation, we should only write to one constant DMA port address, which is 0x01D0 2000, right?

 

  • Hi Thomas,

    That particular statement is given as an example for the case where serializers 0, 4, 5 & 7 configured as transmit - though the wording seems to be more applicable for CPU writes to the DMA port. You are correct in your understanding for your use case - you should write three words using EDMA for the 3 tx serializers once every TX event.

    Not sure what you mean by "put all serializer data within the 4K memory space". But you are correct in that when using the DMA port you only need to write to the DMA port address of 0x1D0 2000 - whether by EDMA or by CPU.

    Regards,

    Sunil

  • Hi Sunil,

    Thanks for your answer.

    In I2S format, 1 tx serializer carries two channels. Each channel uses one word. So per Tx event, I could only transfer one channel. I should transfer the other channel at the next Tx event. Am I right? That says one serializer one time, two channels one serializer two times. 

    For the second question, I believe the DMA port is a constant location without memory space. I just write data into that port and McASP will automatically convey the right data to the right serializers. Right?

    Thanks!

  • Hi Thomas,

    Please refer to sections 24.2.4.3.2 Transfers through the DMA Port and 24.2.4.3.5 Using the DMA for McASP Servicing.This should clarify the usage for you.

    The McASP will generate one DMA event per time slot. In I2S format we have two time slots per frame - so two events will be generated per frame. At every event, data for every active transmit serializer should be written to the XRBUF (in your case, via DMA PORT). Failure to do so will result in underrun errors. You should set up the EDMA to write the required number of bytes (3*4=32) representing data for all active transmit serializers in incrementing order.

    Yes, you do write only to the DMA port - but as mentioned earlier, you should transfer data for every active tx serializer in incrementing order.

    Hope this helps.

    Regards,

    Sunil

  • Thanks for your answer!