-
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): ESP32 - Cannot change baud rate from 230400 to 460800 with Serial.updateBaudRate() #10641
Comments
Yes. correct. Issue confirmed. Fix on the way. |
@deltecent - Please test the PR #10642 and let me know. |
@SuGlider I am very new to the Arduino IDE environment. Is there documentation on how to test a PR? |
@deltecent - In order to test a PR, it is necessary to create an Arduino boards from a sketchbook.
|
@SuGlider Thank you for those instructions. They worked great. PR #10642 appears to have fixed this problem. I want to point out that the comment for this PR in the test program above is in the wrong place. The PR corrects void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
delay(500);
Serial1.begin(230400);
Serial.printf("%d\n", Serial1.baudRate());
// Clock is UART_SCLK_REF_TICK as expected
Serial1.updateBaudRate(460800);
Serial.printf("%d\n", Serial1.baudRate());
// Clock is still UART_SCLK_REF_TICK, should be UART_CLK_APB <<---- FIXED by the PR
Serial1.end();
Serial1.begin(460800);
Serial.printf("%d\n", Serial1.baudRate());
// Clock is now UART_SCLK_APB as expected
}
void loop() {
} Thank you for the quick fix! |
Board
ESP-WROOM-32
Device Description
I have an ESP-WROOM-32 DEV KIT 1 with RX2 and TX2 (Serial2) connected to a MAX3380 RS232 Transceiver.
Hardware Configuration
Nothing else attached to the board.
Version
v3.0.7
IDE Name
Arduino IDE 2.3.3
Operating System
macOS 13.7.1
Flash frequency
80Mhz
PSRAM enabled
yes
Upload speed
921600
Description
#10172 corrects a problem with baud rates above 250K by setting the proper clock source. This functionality only works in
Serial.begin()
and does not work inSerial.updateBaudRate()
.If
Serial.begin()
is invoked with a baud rate under 250K, the source clock is set toUART_SCLK_REF_TICK
, otherwise the source clock is set toUART_SCLK_APB
.If the source clock is set to
UART_SCLK_REF_TICK
duringSerial.begin()
, updating the baud rate withSerial.updateBaudRate()
to one that requiresUART_SCLK_APB
will not work because the source clock isn't change.Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: