Serial receive

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial receive

96 Views
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 Kudos
1 Reply

88 Views
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 Kudos