espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.7k stars 7.29k forks source link

UART reading issue without any driver errors (IDFGH-4948) #6740

Open pbruynbroeck opened 3 years ago

pbruynbroeck commented 3 years ago

Environment

Problem Description

We have a GNSS receiver that sending frame over UART to the ESP. After several hours of operation, the ESP start to read wrong values. In our application, we can check if the frame is valid thank to a CRC. Here, I plot the total number of CRC error over the time (in ms):

image

As you can see, after ~20h, we start to have a lot of reading error. After the last CRC err, the behavior returned to normal.

We are using the default uart_driver like in the uart_events_example_main.c. In the left, I print data received in uart event queue, and in the right all data that read on the UART with a raspberry.

image

If you want more data:

As I mentioned in the title, in the uart event queue, all data have the type UART_DATA. We haven't any driver errors.

Alvin1Zhang commented 3 years ago

@pbruynbroeck Thanks for reporting and sharing the logs, we will look into.

dzarda commented 2 years ago

I'm also having issues with UART reception yielding data corruption.

People have reported RX corruption in higher data throughput (same as me) but your described behavior is interesting. Could there be some increased system load at the 20 h mark?

Have you gained additional knowledge since?