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.

UART driver missing RX packets

Other Parts Discussed in Thread: MSP430F5659

I've configured TI-RTOS UART driver to communicate with a co-processor, with the following configuration:

  • Baud rate is moderate (9600)
  • Too bad, but since MSP430 does not support CTS/RTS, there is no flow control
  • A task with highest prioirty is polling the driver by calling UartRead() in a loop, read in blocking mode

Occasionally, UART packets from the co-processor are missed altogether. Scope shows valid signals on the UART lines.

Any ideas how to analyze and solve this?

  • Hi Boaz,

    What version of TI-RTOS are you using? Also could you provide a bit more information about what else is running in your application? It could be that you have either a Hwi or Swi that is pre-empting the high priority Task more than you think. In this case you could potentially miss data coming in as the Task would not be unblocked fast enough.

    Best,
    Alexander
  • Hi Alexander,

    It was TI-RTOS 2.16. After upgrading to 2.20, the issue was gone. To bad the MSP430 UART does not support Hardware flow control (RTS/CTS).

    - Boaz
  • Hi Boaz,

    A few questions, did you update your application at all when you switched to TI-RTOS 2.20? Also when you miss RX packets, are you saying that the Task in which you're performing the UART_read() in gets stuck polling for more data?

    Best,
    Alexander
  • Yes, I created a high-priority task which only function is to call UART_read(), and post messages to a main task. The function does not return, even though enough bytes have been read.

    As to the first question, yes - I also did some changes to the app, so I cannot guarantee that the only diff the the RTOS version, sorry. 

  • HI Boaz,

    Just a bit more information, could you tell me what family of MSP430 you're using? Along with the clock rate and clock source being fed into the UART peripheral?

    Also note that the MSP430 devices, unlike MSP432 do not contain a ring buffer in the driver implementation. As such, if your application is receiving a constant stream of data and not processing it fast enough, missed packets could occur.

    Best,
    Alexander
  • Sure:

    - MSP430F5659
    - CPU freq. 8.192 MHz
    - source clock: MSCLK
    - dividers: prescaler = 53, UCBRFx = 5, UCBRSx = 0, oversampling = 1
    - TI-RTOS v 2.20.00.06
    - compiler TI v16.6.0.STS
  • Hi Boaz,

    Apologies for the late reply. Those values look correct, are you still seeing this issue in your application? If so if you try running the uartecho example that comes with your installation, are you able to run that correctly?

    Best,

    Alexander