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.

DMA issue: block transfer seems never to stop / interrupts aren't executed

Hi All,

I wrote a small application based on  the aic3204 sample by Spectrum. I tried to add DMA functionality, like in the USB_Stick_AudioFilter example from TI. Therefore, I configured DMA0 channel 0 to transfer data to the I2S0 Tx buffer and DMA0 channel 2 to transfer data from the I2S0 Rx buffer to another location, by using ping-pong buffering just very similar as in the AudioFilter example. (codec --> I2S0 --> DMA --> main program --> DMA --> I2S0 --> codec)

What happens now is that the DMA transfer never seems to end (the EN and STATUS bits in DMACH2TCR2 stay always '1'), and I don't get a DMA interrupt. The DMA_Isr is never executed. The DMA interrupt flag in IER0 and the channel flags are set, and the ISR is referenced in my interrupt_vectors.asm.

I then tried to activate the periodical RTC interrupt each secont, but here I've also got the problem that the interrupt never occurs. There seems to be a general problem with the interrupts.

I initialized the DMA carefully according to the procedure described in SPRUFO9 and checked with the AudioFilter example. Can't find an error. Does anybody have a suggestion? Could this be related to compiler/project settings, as I am coming from the Spectrum Digital-example?

By the way, a simple I2S0 audio loopback without interrupts works, so the I2S0 is not the problem.

 

Thanks and regards,

Raphael

  • Hi Raphael and TI experts:
    DMA Issue: Block transfer does not happen, does not get executed. Interrupts are not generated.

    It is more than 5 years, and I have exactly the same problem with the eZDSP C5535. In my case, the program I created was downloaded on line and modified for the C5515. It was originally set up to run on C5505. in the eZDSP board, the I2S0 connections are changed to I2S2. I took care of this in the code.
    However, same as you, I have set the interrupts, enabled and started the DMA's. Auto Reload, ping pong EN, SYNC bit ON. The reading of the TCR2 register for DMA0CH0 shows 0xF205. Same for CH1. For CH2 and CH3 of DMA0, the TCR2 is reading 0xF085. This all seems normal according to the code operations.
    I see that the DMA0CH0-3 TCR1 and TCR2's are all set properly. Also verified that the DMAIER is 0xFFFF. DMA0CESR1 is 0x0101, DMA0CESR2 is 0x0202.
    But....
    DMAIFR remains stubbornly at 0x0000.

    Kind regards, many thanks,

    Shankara
  • Raphael or Shankara,

    Is it possble for you to send the project that demos the problem? This could be a minimized code just to show the problem.

    Thanks!

    best regards,
    David Zhou
  • Hi Raphael, Shankara,

    There exists an similar CSL example "CSL_I2S_AudioCodec_DMA"  in C55XCSL-C5517-AUXPACK which is downloadable from the link

     

    http://www.ti.com/tool/sprc133

     

    Though this example is meant for C5517 device, it has been taken care to work with C5515/35 devices too.

     

    This example has ping pong mode is disabled and this needs to be enabled as per your application.

     

    Hope this example helps you.

     

    Regards

    Vasanth

  • Hi David

    I have attached an extract of the project where I think the problem might reside.

    project.rar

    Thanks!

  • Hi Shankara
    We apologize for the delay in getting back to you on this. The team is currently bogged down with a critical support issue and has not had the chance to look at your project
    By any chance did you look at the examples that Vasantha sent you for c5517, those may actually be a good reference to what you are trying to do.
    Additionally please clarify what evm this project works for you - you mentioned c5505, 15, 35 in your previous email. It would be good to clarify whether this project will run out of box on an TI EVM or you sent this for a code audit?
    Please do evaluate the example Vasantha sent , and let us know if that helps.
    Regards
    Mukul