-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Flushing UART with full buffer prevents further reads from buffer (IDFGH-6819) #8445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That definitely looks like the solution. I'll test it tomorrow. Thanks! Just curious, any reason this was not included for v4.4 launch? Also, would you recommend switching my (still in development) project to the master branch or just manually port this patch to v4.4? |
Thanks for reporting and the notes. We have back ported the fix to release/4.4, currently under internal reviewing. Will sync up once the fix on release/4.4 is available. |
I have manually applied the commit changes to my uart.c and can confirm, that the problem is resolved. As far as I am concerned this issue can be closed, unless @o-marshmallow wants to do anything else. |
Hi @gril002 , thanks for confirming it works. |
Is it also present in release/v4.3, would it be possible to backport it there as well please? |
The fix is already in v4.3 branch: a5a4718 |
Brillant, thank you. |
Hi, I ran into this problem recently using platformIO |
Lots of debugging for uart problems, some mine, but mostly an IDF bug (espressif/esp-idf#8445) Moved some more direct Radio accesses to the queue/task mechanism for a bump in reliability. Implemented dynamic rates for initial testing, driven by SNR.
I'm sorry, I'm having the same issue that has been described here, but I'm not sure if I understand what needs to be done to resolve it. |
Environment
xtensa-esp32-elf-gcc --version
to find it):// 1.22.0-80-g6c4433a
Problem Description
When calling uart_flush() with a full UART RX buffer, the ring buffer is cleared, but all subsequent calls to uart_read_bytes() return zero bytes. I have tracked the problem down to "xSemaphoreTake(rbGET_RX_SEM_HANDLE(pxRingbuffer), xTicksRemaining)" returning pdFALSE in ringbuf.c at line 776 and subsequently not actually reading any data. This essentially means, that once you call uart_flush() with a full RX buffer, you can no longer read any UART data until you reboot the device. If the buffer is not full, when flushing, everything functions as expected.
Expected Behavior
calling uart_flush() with a full UART RX buffer, clears the ring buffer and subsequent calls to uart_read_bytes() return data received after flushing.
Actual Behavior
calling uart_flush() with a full UART RX buffer, clears the ring buffer but subsequent calls to uart_read_bytes() return 0 bytes.
Steps to reproduce
Code to reproduce this issue
GIST
Debug Logs
Other items if possible
build
folder (note this may contain all the code details and symbols of your project.)files.zip
The text was updated successfully, but these errors were encountered: