Different Size LPUART Receive Issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Different Size LPUART Receive Issue

1,039 次查看
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.

标记 (1)
0 项奖励
回复
1 回复

922 次查看
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 项奖励
回复