串口高频接收数据
Posted: Mon Jun 27, 2022 5:21 pm
请教各位一个问题
串口1波特率为921600,以10hz的频率接收数据,每次接受的数据有两条,第一条数据是147字节,以\n结尾,第二条是205字节,以\n结尾,这两条是连续的,
检测设置如下
uart_enable_pattern_det_baud_intr(uart_port, '\n', 1, 9, 0, 0);
代码中Pattern Queue Size是20,
RING_BUFFER_SIZE是2048,
但是一直显示以下warning,会丢失数据
串口1波特率为921600,以10hz的频率接收数据,每次接受的数据有两条,第一条数据是147字节,以\n结尾,第二条是205字节,以\n结尾,这两条是连续的,
检测设置如下
uart_enable_pattern_det_baud_intr(uart_port, '\n', 1, 9, 0, 0);
代码中Pattern Queue Size是20,
RING_BUFFER_SIZE是2048,
但是一直显示以下warning,会丢失数据
Code: Select all
W (8464) uart1: Ring Buffer Full
W (8514) uart1: Pattern Queue Size too small
W (8614) uart1: pos:83
W (8714) uart1: pos:147
W (8814) uart1: pos:205
W (8914) uart1: pos:147
W (9014) uart1: pos:205
W (9114) uart1: pos:147
W (9214) uart1: pos:205
W (9314) uart1: pos:147
W (9414) uart1: pos:205
W (9514) uart1: pos:147
W (9614) uart1: pos:205
W (9714) uart1: pos:147
W (9814) uart1: pos:205
W (9914) uart1: pos:147
W (10014) uart1: pos:205
W (10114) uart1: pos:147
W (10214) uart1: pos:205
W (10264) uart1: Ring Buffer Full
W (10314) uart1: Pattern Queue Size too small