Assert Failed in Ringbuffer When Reading from UART - esp_ringbuf/ringbuf.c:1038

gulkanguner
Posts: 1
Joined: Mon Aug 26, 2024 9:41 am

Assert Failed in Ringbuffer When Reading from UART - esp_ringbuf/ringbuf.c:1038

Postby gulkanguner » 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.

ESP_Sprite
Posts: 9568
Joined: Thu Nov 26, 2015 4:08 am

Re: Assert Failed in Ringbuffer When Reading from UART - esp_ringbuf/ringbuf.c:1038

Postby ESP_Sprite » Tue Aug 27, 2024 12:28 am

That's a ringbuffer pointer that is NULL... very hard to say what the issue is without your code. ESP-IDF 3.3.1 is unsupported by now, though: there's a high chance that if this is an ESP-IDF issue, it's fixed in a more recent version; I'd suggest you try that first.

Who is online

Users browsing this forum: Google [Bot] and 64 guests