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.

OMAP L138 UART EDMA Interrupt problems

Other Parts Discussed in Thread: SYSBIOS

Hey All,

I have a program which handles 2 UART devices at 460800 Baud rate.

I use Omap L138 Logic PD SOM with Starterware (1_10_03_03) and SysBios (6.34.2.18).

The UARTs (0 & 2) are handled by the EDMA CC0 and TCC0 and are inserted to a cyclic buffer.

After working correctly for a while (few milliseconds) one of the EDMA stops triggering completion interrupts.

I attached the relevant part of my project here: 7356.UartEdma.zip

What I do in the program is, Initiate EDMA and UARTS, start UART streaming in both of the UARTS and then wait.
Every completion interrupt, the Cyclic buffer is updated.
After a while (k==1000) I stop and I can see that one of the UARTs interrupts was fired only 15-16 times while the other fired 900 times.

It's important to say that this happens when the UART works in high capacity (actual 290Kbps of the 460Kbps), when working in normal capacity (170Kbps) this doesn't happen.

I cannot change the UART Baud rate.

Regards,
Yoel

  • Hi Yoel,

    Thanks for your post.

    For UART to transfer data in DMA mode, it is important that the lenght of the data is known prior. Because the EDMA transfers only depending on the paramsets programmed.

    I guess it would be a better option, if you can download and refer the BIOS PSP UART driver regarding configuration of the DMA in UART and try it. UART driver(Uart.c and Uart_edma.c files) placed in: pspdrivers_01_30_01\packages\ti\pspiom\uart\src

    Download Link: http://software-dl.ti.com/dsps/dsps_public_sw/psp/BIOSPSP/01_30_01/index_FDS.html

    API's you can refer to:

    uartConfigure(...)

    uartHwSetup(...) for UART register configuration in Uart.c

    uartStartEdmaTxTransfer(...) for edma related config in Uart_edma.c file - (Here only event based transfer mechanism is used)

    And the sample application that demonstrates reading of 100bytes data from the UART console and output the same on the UART console can be found in uartSample.c file placed in: pspdrivers_01_30_01\packages\ti\pspiom\examples\evm6747\uart\edma\src

    Also, you shall refer the below E2E thread for details on UART to trigger any new events:

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/276101.aspx

    Thanks & regards,

    Sivaraj K

    ------------------------------------------------------------------------------------------------------- 
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------
  • Hello Sivaraj,

    Thank you for the quick reply! (Please don't disappear, I need a solution quickly...)

    I understand how the UartDMA works and I am working with it as the attached program shows. What I was trying to explain is when the data rate is getting high one of the UARTs stoppes triggering the edma completion interrupts (the other one can keep up). 

    No matter what I did (reinitialize the whole UART sequence) couldn't make the interrupts come back, only a reset.

    Do you suggest that the Starterware drivers have bugs so I should move to the PSP drivers? Because I already know how to work with starterware and it will take me a while to migrate. Otherwise, what is the pro's in this migration?

    The Uart only receives data in my program.

    Yoel

  • Well,

    It seems like I solved the problem.

    I removed the Uart Disable command after each transfer complete interrupt (I still kept the Uart enable command in the ParamSet update).

    Yoel