How does S32K312 UART receive variable length data using FIFO and DMA. How are you? How can S32K312 UART use FIFO and DMA to receive variable length data? Please give example and comments in the code. Thank you. 回复: How does S32K312 UART receive variable length data using FIFO and DMA. nxp 有类似串口总线空闲中断这种东西吗 串口空闲中断后触发dma搬运 刚接触nxp,有点懵 这个不定长串口数据接收真的很实用 Re: How does S32K312 UART receive variable length data using FIFO and DMA. That is, when using the serial port API to read data, there is no way to determine the number of data that has been read; For example, if size is defined as 128, only 16 bytes are actually read, but there is no way to determine the number of 16 bytes read. 回复: How does S32K312 UART receive variable length data using FIFO and DMA. I currently use Lpuart_Uart_Ip_GetReceiveStatus() to block the judgment; or Lpuart_Uart_Ip_SyncReceive() manually calculates the first data from the end that is not equal to 0x00; Neither method feels very reliable Re: How does S32K312 UART receive variable length data using FIFO and DMA. No it doesn't, I'm thinking of a program to exchange hehehe. WeChat: Ncommonness Re: How does S32K312 UART receive variable length data using FIFO and DMA. Hi li3, did you get your problem solved? Re: How does S32K312 UART receive variable length data using FIFO and DMA. Hello Senlent. Using interrupt receive size equal to 5, I send 6 data using the serial tool, and when I look at the receive buffer using Debug, I can only see 5 data. Also I was asking how to receive data of indefinite length without using size fixed length using FIFO and DMA respectively. Re: How does S32K312 UART receive variable length data using FIFO and DMA. Hi@ li3
"If size is equal to 5, then if 6 data are received, one will be lost"
Why did you come to this conclusion?
Re: How does S32K312 UART receive variable length data using FIFO and DMA. Hello Senlent. If size is equal to 5, then one of the six data received will be lost. If you need to change the code burning every time you change the size, the indefinite length reception is so that you can receive all the length data. I want to test receiving indeterminate length data using FIFO and DMA respectively. Re: How does S32K312 UART receive variable length data using FIFO and DMA. Hi@li3
Wouldn't that just change the receive size of Lpuart_Uart_Ip_AsyncReceive? Re: How does S32K312 UART receive variable length data using FIFO and DMA. Hello Senlent. For example, the Lpuart_Uart_Ip_AsyncReceive function size is equal to 5 and can receive 5 data. What if you need to receive 3, 4, 6 or more data. Re: How does S32K312 UART receive variable length data using FIFO and DMA. Hi@li3
Can you explain to me what you mean by receiving data of variable length? Or what is your intention?
Isn't the size something you can set yourself when you use Lpuart_Uart_Ip_AsyncReceive? Re: How does S32K312 UART receive variable length data using FIFO and DMA. Hello, Senlent. May I ask how the S32K312 UART only uses FIFO to receive data of indefinite length? Can you give an example? thank you. Re: How does S32K312 UART receive variable length data using FIFO and DMA. Hi@li3
There is no demo that fully meets your needs for your reference, here are some discussions and routines that implement UART+DMA.
https://community.nxp.com/t5/S32K/S32K3-LPUART-using-DMA-in-RTD-3-0-0/td-p/1737356
View full article