Skip to content

Add 3M baud to Serial Monitor, Discuss Higher Baud Rates #116

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

Open
3 tasks done
pwnept opened this issue May 4, 2025 · 0 comments
Open
3 tasks done

Add 3M baud to Serial Monitor, Discuss Higher Baud Rates #116

pwnept opened this issue May 4, 2025 · 0 comments
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@pwnept
Copy link

pwnept commented May 4, 2025

Describe the request

Please add a 3M baud rate option, and also consider adding rates of 4M+.

Modern USB-to-Serial chips on many dev boards (e.g., ESP32) routinely support baud rates beyond 2M baud, making it increasingly valuable for the Serial Monitor to support these rates for debugging, logging, and rapid data transfer during development.

Support for 3M Baud (Baseline Request)

Many existing USB-TTL ICs, such as the FTDI FT232R, FT230/1/4X, FT2232C/D Series, and SiLabs CP2102N, advertise support for 3M baud. These ICs are now common in mass-produced devices; for example, the WCH CH343P is widely used on many ESP32 development boards. Despite the fact that 3M baud does not work reliably on many boards, wiring configurations, or with some cloned ICs, having 3M (and other higher baud rates) selectable in the Serial Monitor would still be valuable for experimentation and for users with compatible hardware.

Use cases:

  • Use the built-in Serial Monitor to initially test high baud rates to the PC from a high-performance MCU, before transitioning to an external logging program (which is currently not possible, as outlined in arduino-ide#2718 and related discussions).
  • Reduce serial output code blocking time, especially during rapid data output.
  • This may become even more relevant if/when logging support is added to Arduino IDE itself.

I believe adding 3M would have no ill effects on normal users and should be added. Please let me know if there are caveats or limitations I'm missing. Feedback is very welcome.

Discussion: Even Higher Baud Rates (4M+)

Relatively newer ICs support even higher baud rates. The WCH CH343P/G/C/K, for instance, supports up to 6M; the FT232H and FT2232H series support even faster rates.

My students and I have reliably used many ESP32 devkit boards with the CH343P at 4M for years now. (Test first with Serial Monitor at 2M, then change the code and connect to external programs.)

Historically, it’s been the user's responsibility to research and experiment with baud rates (e.g., the classic ATmega328P with a 16 MHz crystal only reliably supports up to 921600 baud IIRC), but as faster and more diverse chips are now present on consumer hardware and higher bauds are common, what works (or doesn't) is less obvious for typical users. It used to be that a baud rate up to a certain speed would work and you would stop there, but now it is kind of a spotty mess with various holes.

While I have used 12M baud and above for extended periods without problems, I don't know the Arduino IDE user base well enough to judge which rates would be appropriate to be included.

Recommendations

  • Add 3M baud as a selectable option in the Serial Monitor.
  • Consider default inclusion of 4M, and optionally, other common high rates used in modern hardware (e.g., 6M, 12M), especially if user testing and feedback supports it.
  • Optionally: Revisit an "Other..." or "Custom" entry field. This was previously rejected, but if there is now a more elegant way to implement this across platforms, allowing power users to enter arbitrary baud rates with a note that not all rates are supported by every USB-serial IC or MCU could add useful flexibility.
  • Document (in a tooltip/documentation/README) that successful operation at higher rates may depend on both the USB-TTL IC, the system’s USB implementation, cable quality, and MCU/UART hardware.

Describe the current behavior

The Serial Monitor only supports baud rates up to 2,000,000 (2M). Baud rates higher than 2M, such as 3M or 4M, are not available as options in the dropdown or for selection.

To reproduce: Open the Serial Monitor, check the list of available baud rates, and observe that no options above 2M are offered.

serial-monitor version

0.15.0

Operating system

Windows

Operating system version

Windows 10, Version 10.0.19045 Build 19045

Additional context

Examples from Datasheets

WCH and FTDI both provide up-to-date public product lists which clearly state which baud rates each chip supports:

  • CH9102: 1M, 1.5M, 2M, 3M, 4M (max 4M)
  • CH343: 1M, 1.5M, 2M, 3M, 4M, 6M (max 6M)
  • CH344: 1M, 1.5M, 2M, 3M, 4M, 5M, 6M (max 6M)
  • CH346: up to 15M, depending on mode supports:
    • 1M, 1.5M, 2.5M, 3M, 5M, 7.5M, 15M
    • 1M, 1.5M, 2M, 3M, 4M, 6M, 12M
    • 1M, 2M, 2.5M, 5M, 10M
  • CH347: up to 9M and lists: 1M, 1.5M, 2M, 3M, 4M, 5M, 6M, 7M, 8M, 9M
    (9M is only possible in mode 0; it is said other modes limit baud rates to 7.5M, which does not appear as a listed rate.)
FTDI Device Details and Limitations

For FTDI parts such as FT232H, per Application Note AN_120: Aliasing VCP Baud Rates, I've come up with the following rates that are achievable within ±3% (as said in the AN) from 1M to 12M in increments of 500k:

Target Baud Rate Closest Achievable Baud Rate % Error Divisor Used
1,000,000 1,000,000 0.00% 12.0 (n=12)
1,500,000 1,500,000 0.00% 8.0 (n=8)
2,000,000 2,000,000 0.00% 6.0 (n=6)
2,500,000 2,526,316 +1.05% 4.75 (n=4, sub=0.75)
3,000,000 3,000,000 0.00% 4.0 (n=4)
3,500,000 3,428,571 -2.04% 3.5 (n=3, sub=0.5)
4,000,000 4,000,000 0.00% 3.0 (n=3)
4,500,000 4,571,429 +1.59% 2.625 (n=2, sub=0.625)
5,000,000 5,052,632 +1.05% 2.375 (n=2, sub=0.375)
5,500,000 5,647,059 +2.67% 2.125 (n=2, sub=0.125)
6,000,000 6,000,000 0.00% 2.0 (n=2)
6,500,000 N/A
7,000,000 N/A
7,500,000 N/A
8,000,000 8,000,000 0.00% 1 (n=1)
8,500,000 N/A
9,000,000 N/A
9,500,000 N/A
10,000,000 N/A
10,500,000 N/A
11,000,000 N/A
11,500,000 N/A
12,000,000 12,000,000 0.00% 0 (n=0)

Note:
According to FTDI's AN_120, sub-integer divisors are not allowed if the main divisor (n) is either 0 or 1.
This means that only 6M (divisor=2) and 8M (divisor=1) are possible between 6M and 8M; intermediate rates like 6.5M, 7M, or 7.5M are not achievable on FT232H/FT2232H/etc.
All entries marked N/A in this range cannot be set in hardware.


I noticed that JSSC also lists 1.5M, 3M, 3.5M, and 4M among its baud rate options, if this is relevant.

References

Related

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details
@pwnept pwnept added the type: enhancement Proposed improvement label May 4, 2025
@per1234 per1234 added the topic: code Related to content of the project itself label May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants