Level 1 — Basic calculation

UART Baud-Rate Divisor & Error

Baud-rate divisor, actual baud rate and error of a UART for a clock and oversampling, with bit time and throughput.

How it works — UART Baud-Rate Divisor & Error

1/baud fclk / (OS·N)

Inputs

fclk
Peripheral clock (MHz)
OS
Oversampling

Formula

  • N = round(f_clk/(OS·baud))
  • baud = f_clk/(OS·N)
  • error = (actual − target)/target

Results

N
Divisor
1/baud
Bit time
Reset

Results

Enter your values and press Calculate. The defaults are a worked example.

Formula

N = round(f_clk/(OS·baud)) · baud = f_clk/(OS·N) · error = (actual − target)/target

Show the math

Worked solution

Press Calculate to see every step with your values substituted.

Calculation level & design standard

Level 1 — Basic calculation

A direct engineering equation.

Preliminary engineering calculation — no jurisdiction-specific code compliance claimed. Verify the applicable requirements with a qualified professional.

Assumptions

  • Integer divisor (no fractional baud-rate generator).

References

  • Microchip AVR / ST STM32 reference manuals — USART chapters

Results are for preliminary design and education. Verify against the governing code and have critical work checked by a licensed professional engineer.

Sign in

or with email

Forgot password?