-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
UART RX inserts extra byte when Clock is 240MHz and Optimize is set for performance (IDFGH-3934) #5824
Comments
Hi @davidthings, Current solution similar to what I proposed in #4499 and it works on my side is:
I will let you know as soon as I get new information or results. |
Hi @davidthings, Below is the information about this issue:
Solution:
The preliminary fix for driver to read rx FIFO is already merged. The documentation update is in progress. |
The issue has been fixed (Commit: 3a51584) and ECO document has been updated: www.espressif.com/sites/default/files/documentation/eco_and_workarounds_for_bugs_in_esp32_en.pdf The issue can be closed. |
Thanks for reporting, feel free to reopen. |
This is actually noted and solved in #4499, but the context (modbus) might not lead people to the correct solution.
Per #4499 (comment) , an extra line is needed in the uart hal internals)
At least on my set up, this does fix the bug. Since I've spent some time describing the problem before I stumbled on the fix, here it is!
Environment
Problem Description
When reading from the UART at 240MHz with optimize for performance, the first byte of a message is duplicated (and the last lost).
The problem appears independent of FreeRTOS tick frequency, or baud rate.
The test set up is a loopback from pin 17 -> pin 16, and run the following:
Expected Behavior
When either running slower than 240MHz or not optimizing for performance this is the output
Actual Behavior
Whereas - at 240MHz and Optimizing for performance (o2), this is the result:
Steps to reproduce
Build with and without 240MHz & O2 optimization.
The text was updated successfully, but these errors were encountered: