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 EDMA reads extra bytes from UART

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

Hi,

I am using Omapl-138 EVM. I have configured EDMA3  for UART. I am receiving the data from UART through DMA and putting received data  in a buffer. It works fine at low baud rates upto 460800bps.  It does not work at higher baud rates. The problem I see is,that EDMA reads one or two extra bytes some time. I have also enabled hardware flow control but it makes no difference. Even no error occur on UART side.

Has any one used serial Rx with DMA at such higher baud rate? Any help or clue please?

I am using our own proprietary softwares.

Thanks in advance

Jam

  • Hi,

    Thanks for your post.

    I know that, UART can be serviced by EDMA but the UART speed is limited by the datasheet to 3 MBaud or the application's tolerance for bit errors. In general, when you work in faster UART baud rate, the buffer gets empty much faster which means you have to delay for a longer time.

    By default, the soft UART code do not support 460800 baudrate.  The code defines a base baud rate (115200 by default) and other baud rates can be achieved by prescalars, or divide by factors.  The code supports the following prescalar/ divide by numbers:

          1, 2, 4, 6, 12, 16, 24, 48, 64, 96 & 192

    Since 460800 baudrate requires a divide by factor value of 4 (460800/ 115200 = 4), it is not supported with the base baud rate = 115200 configuration. In my understanding, DMA is capable to pick data at higher baudrates, but you need to configure the divisor value and desired baud rates so that, to produce a appropriate baud clock which needs to be compliant as per the omapl138 specification. For more details on the same, please refer the below E2E post:

    http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/349426/1224537#1224537

    For the divisor value formula to calculate and more details, please refer section 32.2.1 from the omapl138 TRM as below:

    http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    -------------------------------------------------------------------------------------------------------

  • HI Sivaraj Kuppuraj ,
    Thanks for you response.I hope you will be here upto the time,that solves the problem:)
    I mentioned 460800 just for an example purpose that I am able o communicate upto this baud rate. For other higher baud rates, the problem occurs.I am using two omap-L138 boards back to back so error in buad rate calculation will not affect a lot(though my divisor are correct and error is minimum as possible). The problem seems with EDMA and UART FIFO. As EDMA reads extra bytes from FIFO . The link, you mentioned is different as,there is overrun error.

    Is there any reference implementation for UART Rx side using EDMA for Omap-L138 or any platform having same UART controller?

    Thanks

  • Hi

    Please see if the following analysis summary helps in terms of good practice for FIFO setup etc

    Linux drivers as far as i know are mostly CPU/polling based. 

    you might find sample implementation on UART-EDMA in Starterware

    Regards

    Mukul