The S32K312 UART receives variable length data.

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

The S32K312 UART receives variable length data.

1,148 次查看
li3
Contributor II

Hi NXP,

    When I use the S32K312 UART to receive data of indefinite length, I encounter the following two questions, please ask NXP to answer, preferably give an engineering example.

    How to use interrupts to receive data of indefinite length?

    How to use DMA to receive variable length data?

Best regards,

Li 3

0 项奖励
回复
1 回复

1,108 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @li3,

Both the interrupts and the DMA transfers are handled by the LPUART driver.

Call the Lpuart_Uart_Ip_AsyncReceive() and use the UartCallback.

danielmartynek_0-1715929765002.pngdanielmartynek_0-1715929765002.png

There is this API that can be used to extend the AsyncReceive() call from the callback:

danielmartynek_1-1715929821288.pngdanielmartynek_1-1715929821288.png

Also, the application can call Lpuart_Uart_Ip_GetReceiveStatus() to get the status of the call.

 

BR, Daniel

 

 

0 项奖励
回复