-
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
1M UART Baud rate issue (IDFGH-7366) #8947
Comments
Data from host processor Data recvd on ESP SDK version - 4.4 |
@naragururaj Hi! I also use uart on 1 megabit and ran into the same problems. And finally solution: use small MCU with DMA unit for UART communication at 1 MBit/s with reliable protocol with acknowledgment between ESP32 and MCU, |
Hi @barkov00, Thanks for getting back to me with the response. If 1Mb has data loss, then can you please confirm 460,800 rate has no or minimal loss or better if you could suggest what is the highest optimal rate that we can use? |
@naragururaj i dont try this bitrate. can you make tests and report about results here? |
Hi @naragururaj, @barkov00, Thank you for this report. I think firstly the issue should be confirmed on both sides using the same testing approach. I propose to use the uart_echo example on ESP32 and start the python script below to check communication. The echo example baud rate should be changed here. The script to check errors can be started on the host machine and can communicate with echo example using a simple USB to TTL adapter.
The above script and posted modified echo example allow verification of received data. In case of failure, it prints all buffer indexes with expected and received data. Please try this on your side to confirm the errors on different baud rates. Please send your baud_test.log file produced by the script. |
@alisitsyn , Hi! This test works nice. It seems, when using other modules (WiFi, TCP stack) with USART it sometimes cause data loss. |
There are several aspects that may apply to this behavior:
The other components with their interrupts and tasks may apply to this behavior but it is more like an application architecture/configuration issue. I propose focusing on these points and doing more investigation in this area.
The DMA support in the driver is just another approach for driver realization. This option has been investigated in UHCI drivers (esp32s3, esp32s2, and esp32c3) but cannot be used as a panacea for this kind of issues. |
Hi @alisitsyn, Sorry for the late reply.
|
Hi @naragururaj, Your application algorithm looks ok to me. I think you need to check several scenarios to handle the data and using of HAL is required in high speed applications. We still at least need some test approach and test results to confirm if it is espressif software/hardware issue. I have some automated test results that show that UART can work on 1Mbit reliably. However my setup with just |
Thanks for reporting, sorry for the slow turnaround, fix is available at f352469, feel free to reopen. |
We are using ESP32 wrover for UART and BLE. Max baud rate that we can achieve with no data corruption is 115200 on the UART between 2 serial device. As per the spec I understand we can go upto 1M. Are there any known limitation?
The text was updated successfully, but these errors were encountered: