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.

RTOS/MSP432P401R: Data loss in UART Echo demo

Part Number: MSP432P401R

Tool/software: TI-RTOS

Hi everyone,

I am using MSP432 Evaluation Kit and sending data via UART using TI-RTOS api (UART_write and UART_read, Baud rate is 115200). However, I found there are a lot of data losses in UART after sending around 50 bytes (before 50B is ok). To solve the problem, I tried a loopback test using UART Echo demo and I got the same result. After looking into the codes in MSP_EXP432P401R, I found I can use a larger ring buffer size (default is 32 B) and I changed the size to 512 B, after which I made it to work without data loss.

Is there any other way to solve the problem? Looks like a big buffer isn't a good solution.

Any suggestion is helpful.

SL61

  • Hello,
    I am looking into this. Alternative to the buffer size is that you could slow down the baud rate so that the ringbuffer can keep up with the UART.

    Regards,
    Chris
  • Since the MSP432 does no include flow control in the peripheral HW, the ring buffer has the potential to overflow. I will file a bug to help address this in future revisions. In your own application do you have any mechanism to control the flow of data?

    Regards,
    Chris
  • Thanks for reply. I currently use 2 GPIOs as HW flow control to communicate with other devices. Since I use APIs from OS layer, like GPIO_write(), GPIO_read() and UART_write(), the actual speed seems slower than setting (baud rate: 115200).
    I setup my test with one MSP432 launchpad and one third-party test board (EM35x Breakout Board) with HW flow control. The test board has a USB to UART bridge so I send data from PC terminal and let the MSP432 echo the received data. On the terminal, I saw the speed is around 3.6Mbps. At this speed, no data loss.

    Best,
    SL61

  • THank you for the follow- up and sharing your test results.

    Chris

**Attention** This is a public forum