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.

Enabling DMA for McBSP2 for Audio rendering on OMAP3530

Other Parts Discussed in Thread: TPS65950

Hi All,

I am trying to use McBSP2 for rendering audio samples to the TPS65950 audio codec module. I am trying to enable DMA for that.

What is the size of transmit buffer in McBSP2? Spec says that it has 4Kbytes audio buffer and 1Kbytes Transmit buffer. 

I need to configure the Transmit threshold value in MCBSPLP_THRSH2 register for a hardware synchronized DMA transfer. Spec says that  as long as the XB(Transmit Buffer) free locations level is above or equal to the THRSH2_REG value + 1, the DMA request will be asserted. After transferring the configured THRSH2_REG value + 1 number of words, the transmit DMA request will be de-asserted and reasserted as soon as the conditions are met again.

Assuming Transmit buffer is 4Kbytes , Planning to set Threshold Value as 256 Words(1Kbytes).  When the free locations in 4Kbytes buffer goes beyond 1Kbytes DMA is automatically triggered. 

 

Expecting Help on this

 

Regards

Jack

 

  • Hi.

    Whatever spec says, actually  you must consider  XB as a global entity. Thus, the whole size of  the XB = (1024*32) + (256*32) = 5Kbytes. This means that you have two FIFO that act as one.

    Imagine you're programming an xthreshold interrupt. When you set a XTHRESHOLD_SIZE, it doesn't  matter the size, because the interrupt will trigger whatever happens as there are 0x500 free locations since the first moment.

    I think you first must manage with simple McBSP interrupts instead of DMA programming, let that staff for a next step.