You are here

Maximum possible Baudrate in UART?

6 posts / 0 new
Last post
Last seen: 2 years 2 weeks ago
VESC Original
Joined: 2017-08-21 17:38
Posts: 4
Maximum possible Baudrate in UART?



I'm testing high rate current control over 1kHz using USB-Serial connection.

For testing, I changed the baudrate in VESC-TOOL. I tested from 1152000bps baudrate.

In my case, the connection was successful at below bps.

115,200 bps : ok

230,400 bps : ok

345,600 bps : X

921,600 bps : ok

I was surprised when 921,600 bps works even the 345,600 bps is not working.

Do you know why and Is there any body who knows the maximum baudrate in USB-Serial?


And also it will be good to know what is the maximum possible baudrate in UART.

In the STM32F4 datasheet, It seems that the UART supports 5.25Mbps, is it right?




Last seen: 2 weeks 4 hours ago
VESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 486

If you use the USB port on the VESC, the baud rate is actually ignored and the connection runs as fast as USB1.1 allows. If you use a USB-Serial adapter and connect over UART the baudrate you enter matters.

Last seen: 2 weeks 4 days ago
Joined: 2019-01-20 20:35
Posts: 10

Do you need to change firmware to change baud rate? *EDIT no

Last seen: 1 year 9 months ago
Joined: 2018-02-23 14:00
Posts: 6

Not all hardware is able to talk all baud rates - this explanation has more info:

It all depends on the frequency of the crystal controlling each device, and the serai divider MCU circuitry

For an 8mhz 3.3v Arduino Prio Mini, for example, 115200 is one of the worst possible baud rates - the 3.5% error makes it extremely unreliable.

Last seen: 3 years 6 months ago
Joined: 2019-05-20 18:22
Posts: 2

I have 115200 UART working well on Teensy LC because it has a hardware serial port.


Hardware: Connect RX and TX of the ESC UART to RX1 and TX1 of the Teensy LC. 

RollingGhecko's example for reading values work perfect. 


Last seen: 1 year 10 months ago
Joined: 2018-05-21 22:06
Posts: 2

I stumbled on something odd while testing communication between esp32 and VESC using uart at 115200. i'm using the example files from benjamin's example, with modified send_packet function for the ESP32.  I poll the VESC with bldc_interface_get_values(), and record the result. Interestingly I get 0 packet loss if the motor is stationary, or spinning/spun in positive(re rpm) direction. Turning the motor in opposite direction produces almost 30% packetloss, even if barely touched. Oddly, decreasing Baud rate made it worse, while increasing it to the above suggested value of 921,600 bps reduced the packet loss to absolute 0. I'm relatively new to this, could anyone explain what might be happening here?

(I read the above link, but it was not very helpful)

UPDATE: increasing the interval at which i call  bldc_interface_uart_run_timer() from 1 to 3 ms fixes the packetloss issue at lower baud rates