Assert Failed in Ringbuffer When Reading from UART - esp_ringbuf/ringbuf.c:1038
Posted: Mon Aug 26, 2024 9:49 am
Steps to Reproduce:
1. Initialize UART2 with sensor1 pins (IO25/IO26) at 9600 baud rate.
2. Read data from UART2 (sensor1).
3. Flush and delete UART2.
4. Initialize UART2 with sensor2 pins (IO18/IO23) at 115200 baud rate.
5. Read data from UART2 (sensor2).
6. Flush and delete UART2.
7. Repeat this process every 30 seconds.
Expected Behavior:
The UART data should be read without any errors or assertion failures.
Actual Behavior:
After about 8 hours, the program crashes with the error mentioned above.
Environment:
- ESP-IDF version: 3.3.1
- Hardware: ESP32-WROOM-32 with 2 sensors using UART communication
- Compiler version: xtensa-esp32-elf-gcc 5.2.0
- FreeRTOS environment
Additional Context:
The issue is temporarily resolved by resetting the device or putting it into sleep mode. Please let me know if further details or logs are needed.
1. Initialize UART2 with sensor1 pins (IO25/IO26) at 9600 baud rate.
2. Read data from UART2 (sensor1).
3. Flush and delete UART2.
4. Initialize UART2 with sensor2 pins (IO18/IO23) at 115200 baud rate.
5. Read data from UART2 (sensor2).
6. Flush and delete UART2.
7. Repeat this process every 30 seconds.
Expected Behavior:
The UART data should be read without any errors or assertion failures.
Actual Behavior:
After about 8 hours, the program crashes with the error mentioned above.
Environment:
- ESP-IDF version: 3.3.1
- Hardware: ESP32-WROOM-32 with 2 sensors using UART communication
- Compiler version: xtensa-esp32-elf-gcc 5.2.0
- FreeRTOS environment
Additional Context:
The issue is temporarily resolved by resetting the device or putting it into sleep mode. Please let me know if further details or logs are needed.