Serial receive

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

Serial receive

1,529 次查看
Ada-gc
Contributor II

When I use this interface to receive data, why can I only receive the first byte?

LPUART_DRV_ReceiveData(INST_LPUART0, &rbuf, 1);

0 项奖励
回复
1 回复

1,521 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

LPUART_DRV_ReceiveData(INST_LPUART0, &rbuf, 1); here you set the rxSize=1, so it will only receive one date.

Interrupt-based communication nobookmark .pngLPUART_DRV_ReceiveData main lpuart_driver.png

LPUART_DRV_SetRxBuffer can be called from the rx callback to provide a different buffer for continuous reception.

LPUART_DRV_SetRxBuffer.png

Hope it helps:S32K1xx SDK LPUART外设驱动接收介绍

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复