How to put variable length data received by serial port in an array?

2 posts / 0 new
Last post
MrWeng
Offline
Last seen:13小时51分钟前
加入:2020-02-13 08:56
How to put variable length data received by serial port in an array?

During serial debugging, I encountered the following problems:
1. How to put the variable length data received by serial port in an array? What should I do to achieve it? This is critical to me.
2. When I am debugging, I continue to execute from the receiving interrupt processing function (uart_rx_isr) to the receiving callback function (uart_read_cb). After the receiving callback function is executed, press F11 to continue execution, and then jump to this function uart_rls_isr, I think Know under what circumstances will trigger this function (uart_rls_isr)?
Thank you very much for taking the time to solve these problems.

Device:
齐放
Offline
Last seen:15 hours 25 min ago
工作人员
加入:2019-12-30 09:02
Hi MrWeng

Hi MrWeng

1. How to put the variable length data received by serial port in an array? What should I do to achieve it? This is critical to me.

May I confirm that if you are going to collect varied lengths of data and out them into an array, or sort different lengths of data into specific arrays?

You could check Ring Buffer function in UART example from our SDK. We have callback function on returning length of rx data.

2. When I am debugging, I continue to execute from the receiving interrupt processing function (uart_rx_isr) to the receiving callback function (uart_read_cb).

Which project and dev board you are debugging with? uart_rls_isr would be caused by recive line error.

Best regards,

Qifan