Different Size LPUART Receive Issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Different Size LPUART Receive Issue

465 Views
Okan
Contributor I

Hello Dear NXP Employees,

I would like to different size data from lpuart receive. 

1- How can i do that?

2- For this problem i have tried to clear rx buffer when i receive data but i can not clear the rx buffer. How can i clear lpuart rx buffer in Simulink and Arm Studio? 

Thank You.

Tags (1)
0 Kudos
1 Reply

348 Views
cristiand
Contributor I

Hello,

I think you can use a software approach to this problem. You can use delimiters in the message you send over uart and to read characters into a string one by one.

For example, if you want to send voltage, current and fault status over uart, you can format the message like this "voltage:10;current:1;fault:0" (using the ; as a delimiter). Then you can break the message like this:

  • Voltage:10
  • Current:1
  • Fault:0

Let me know if this approach helps you.

0 Kudos