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.

EVMOMAP-L137. How to increase UART bit-rates through PSP drivers?

Other Parts Discussed in Thread: OMAP-L137

Hi,

I am working on the UART in DMA mode (omap-l137 evaluation board). I have successfully run the UART sample application that comes with the pspdrivers_01_30_00_06 package (in directories pspdrivers_01_30_00_06\packages\ti\pspiom\examples\evmOMAPL137\uart\edma). The example runs fine with bitrates up to 115.2kBaud, but we want to increase this to up to 2MBaud.

In the "OMAPL137 BIOS PSP User guide" (http://downloads.ti.com/dsps/dsps_public_sw/psp/BIOSPSP/01_30_00_06/content/OMAPL137_BIOSPSP_Userguide.pdf), page 21, paragraph 2.3.3 we have:

'The UART driver does not impose a restriction configuring the UART peripheral for baudrates greater than 115200 baud. However, when configuring for higher baudrates, one needs to tweak the parameter rxThreshold and softTxThreshold.'

I have tried to tweak these parameters a bit, but have not managed to increase the baudrate yet (currently I only try to increase it to 230.4kBaud):

uartParams.baudRate = Uart_BaudRate_230_4K; //Have added this in enum Uart_BaudRate in Uart.h
 uartParams.softTxFifoThreshold = x; //x can be a number >=1
 uartParams.rxThreshold = Uart_RxTrigLvl_xx //xx can be 1,  4, 8, 14

I receive some garbage on the terminal, but it is not decoded correctly. Does it exist a sample program for running the UART in higher speeds? Can anyone help me out here?

Best regards,

Tarjei

  • Hi Tarjei,

    Thanks for the post.

    Tarjei: said:

    I have tried to tweak these parameters a bit, but have not managed to increase the baudrate yet (currently I only try to increase it to 230.4kBaud):

    uartParams.baudRate = Uart_BaudRate_230_4K; //Have added this in enum Uart_BaudRate in Uart.h 
     uartParams.softTxFifoThreshold = x; //x can be a number >=1
     uartParams.rxThreshold = Uart_RxTrigLvl_xx //xx can be 1,  4, 8, 14

    I receive some garbage on the terminal, but it is not decoded correctly. Does it exist a sample program for running the UART in higher speeds? Can anyone help me out here?

    I could not find any sample programs to run the UART in higher speeds.

    Please verify the higher baud rate error percentage and tolerance accepted by the device.

    Please refer the TRM(spruh92) section 31.2.1 Clock Generation and Control, Table 31-1 and Table 31-2 for the same.

    • What is the UART Input Clock frequency?
    • What is the Error % with Higher baud rate?

    Please ensure that the other UART terminal supports the higher baud rates and the Error(%) is with in the tolerance accepted.

  • Thanks for the answer Rajasekaran,

    I think I have sorted it out now. In order to simplify things, I used the register CSL macros directly instead of going through the pspdrivers.

    I first found that the RS232 port on my docking station had a limitation on 115200bps. I then tested in loop-back mode, i.e. that the transmitter sent directly into receiver. I could then successfully increase the bitrates. For ~2m loopback I reached roughly 1Mbps, while for 10cm loop-back 2Mbps was ok.

    The registers I changed was DLL and MDR_OSM_SEL. E.g. for 921600bps I would use:

    • CSL_FINS(uart2Regs->DLL, UART_DLL_DLL, 0x0A);
    • CSL_FINST(uart2Regs->MDR, UART_MDR_OSM_SEL, 16XOVERSAMPLING);

    I then got a USB til RS232 cable (about 2m) which I could connect directly into my computer. I then managed to successfully transmit on 921600bps while I managed to receive up to 460800bps.

    I am now quite confident that with a better set-up (shorter cables etc), I will be able to achieve 2Mbps.

    Regards

    Tarjei