S32K144W LPUART single byte reception and not wait if no bytes is received?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K144W LPUART single byte reception and not wait if no bytes is received?

858件の閲覧回数
harivignesh
Contributor I

I have a use case where I need to receive bytes of data from a PC application based on different button presses. If 'button1' in the PC application is clicked, it sends 35 bytes of data, and if 'button2' is clicked, it sends 36 bytes of data.

These button clicks can happen at any time, and the S32K14WEVB-Q064 # needs to detect when bytes are sent, fetch the data, and send it back to the PC application. Whenever no button is clicked, the S32K144W should not attempt to read any data since no bytes are being sent, allowing it to continue performing its usual tas

I have taken the lpuart_echo_s32k144W example project as a reference, but I noticed that if no data is received, the program stops at the highlighted line. I need a solution where I can check the reception of each byte, and if no data is received, the program should stop receiving data and continue performing its usual tasks. How can I modify the program to achieve this? Kindly assist me with this issue.

タグ(3)
0 件の賞賛
返信
1 返信

800件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @harivignesh,

Use the callback instead of polling the status

danielmartynek_0-1735820699761.png

Implement the UART_EVENT_END_TRANSFER too.

danielmartynek_1-1735820743398.png

 

Regards,

Daniel

0 件の賞賛
返信