UART DMA issue

Hi everyone.

I'm working on a project with the ADSP-21369 EZ-kit lite and I have some issues related to the UART DMA.

I'd like to transmit a large amout of data through the UART without having to wait for the transmission of every single character because the project I'm working on is supposed to run in real-time. I think UART DMA might be the solution so that other algorithms can run while the data is transmitted. Am I right? By the way, how does UART DMA works? Is there any example you might provide?

Thanks,

-Pedro

  • 0
    •  Analog Employees 
    on Feb 28, 2011 4:21 PM

    Hi Pedro,

    I have an example code written for ADSP-21469 for UART DMA. Attaching the same. You could port the same to ADSP-21369 without much changes.

    Hope this helps. Please let me know if you have any further specific doubts.

    Thanks,

    Mitesh

  • Hi Mitesh,

    Your example code was helpful to get me started but I want to use the interrupts instead of polling the UART0STAT register. According to EE-296, it should be possible without altering the UART0IER register and according to http://ez.analog.com/message/6041, mapping the UART Tx/Rx interrupts to any of the programmable interrupts using PICRx registers should do the trick but somehow, attached code doesn't seem to work after the first DMA. What am I missing here?

    Thanks in advance,

    Ibrahim

  • 0
    •  Analog Employees 
    on Apr 19, 2011 11:11 AM

    Hi Ibrahim,

    I looked at the code you attached. But, I couldn't see any specific issue with the same. Could you please mention if you see the UART DMA finishing as expected (count reaches zero)? Also, could you please check if the UART interrupt (P13I) is latched by looking into the LIRPTL regsiter using VisualDSP++ window?

    Thanks,

    Mitesh

  • Hi Mitesh,

    Yes, the counter successfully counts back to 0 and P13 interrupt is latched. If I step through the code, it works fine but if I clear the break points and let it run, I get strange outputs. I attached the snapshot of the terminal output.

    It looks like a time mismatch.

    Thamks,

    Ibrahim

  • Hi Mitesh,

    I think we have found where the problem is. If you have a look at the attached program, we have to wait for a while after ISR before disabling the UART. I think the interrupt is latched earlier than transmitting the last byte(s). Is there a better or more accurate way to identify when the last transmission is complete?

    Thanks,

    Ibrahim