Page 1 of 1

Special baud rate

Posted: Wed Sep 19, 2018 2:47 am
by 1163167506
hi all
Does esp32 support special baud rate? like 115555

Re: Special baud rate

Posted: Wed Sep 19, 2018 4:37 am
by ESP_Sprite
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.