Special baud rate

1163167506
Posts: 30
Joined: Mon Jun 11, 2018 5:52 am

Special baud rate

Postby 1163167506 » Wed Sep 19, 2018 2:47 am

hi all
Does esp32 support special baud rate? like 115555

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Special baud rate

Postby ESP_Sprite » Wed Sep 19, 2018 4:37 am

The ESP32 has a fractional baud rate generator. The calculation of the divider for this is (apb_clk*16)/baudrate. The apb_clk normally is 80MHz. So e.g. for 115555 baud, you'd get a divider of ((8000000*16)/(115555)) = 1107.698. Because this number needs to be integer, it's rounded up to 1108, which will give you a baud rate of 115523. In general, baud rates can have a mismatch of about 1% and still work OK, and the difference between 115523 and 115555 is less than 1%, so the ESP32 can indeed run at this baudrate.

Who is online

Users browsing this forum: No registered users and 86 guests