STM32 72MHz USART 115200 Baud BRR Register Calculator

Compute exact STM32F103 72 MHz APB2 USART_BRR mantissa and 4-bit fraction hex values with baud error % across standard serial rates.

Jump to results

Inputs

MCU clock & divider
Frame & oscillator budget
Crystal ~20–50 ppm; internal RC ~10,000 ppm (1%).

Results

Estimates
Baud rate timing error+0%
Actual synthesized baud
115,200 bps
Prescaler register
BRR = 0x0271 (39 + 1/16)
Ideal vs. actual divisor
39.063 → 39.063
Stop-bit worst-case drift
0.1% of 1 bit
Bit / frame duration
8.68 µs / 86.8 µs
Link margin screen
Pass (reliable)
Bit-timing & receiver sampling drift (10-bit frame)
ST D0 D1 D2 D3 D4 D5 D6 D7 SP Ideal center tick (dashed) vs. drifted RX sample dot (amber) Baud error: 0% · Stop-bit worst-case drift: 0.1% of 1 bit
Standard baud rates at this clock
Target bpsActual bpsRegisterError %Status
9,6009,600BRR = 0x1D4C (468 + 12/16)+0%Pass (reliable)
19,20019,200BRR = 0x0EA6 (234 + 6/16)+0%Pass (reliable)
38,40038,400BRR = 0x0753 (117 + 3/16)+0%Pass (reliable)
57,60057,600BRR = 0x04E2 (78 + 2/16)+0%Pass (reliable)
115,200115,200BRR = 0x0271 (39 + 1/16)+0%Pass (reliable)
230,400230,031.9BRR = 0x0139 (19 + 9/16)-0.16%Pass (reliable)
460,800461,538.5BRR = 0x009C (9 + 12/16)+0.16%Pass (reliable)
921,600923,076.9BRR = 0x004E (4 + 14/16)+0.16%Pass (reliable)

Keep single-side baud error under ±2.0% and total TX+RX stop-bit drift well below 45% of one bit period to prevent UART framing errors.

Calculate exact STM32 USART_BRR hex values with 4-bit fractional division

STM32 USART peripherals include a 12-bit integer mantissa and 4-bit fractional divider (`USART_BRR`), resolving clock division to 1/16th of a cycle. On an STM32F103 running USART1 from the 72 MHz APB2 bus, 115,200 bps maps to `USARTDIV = 39.0625`—literally an exact match (`39 + 1/16`, `BRR = 0x0271`) with 0.000% error!

Watch out for USART2/USART3 on APB1, which runs at half speed (36 MHz) on STM32F103; load the 36 MHz preset to verify its BRR register (`0x0139`) immediately.

Formulas

  • USARTDIV = F_PCLK ÷ (16 × Baud)
  • BRR = (Mantissa << 4) | Fraction_4bit
  • 72 MHz / (16 × 115,200) = 39.0625 → BRR = 0x0271 (0.000% error)

Worked example

At 72 MHz and 115,200 bps, ideal divisor 39.0625 equals 39 + 1/16 exactly (`BRR = 0x0271`), yielding 115,200.0 bps and 0.000% quantization error.

Frequently asked questions

Why does STM32 USART1 use a different BRR value than USART2?

On STM32F1/F4 families, USART1 sits on high-speed APB2 (e.g., 72 MHz or 84 MHz) while USART2–UART5 sit on lower-speed APB1 (36 MHz or 42 MHz).

When should I enable OVER8=1 (8× oversampling) on STM32?

Use 8× oversampling when pushing multi-megabit baud rates (e.g., 4.5 Mbps on 36 MHz PCLK) where 16× oversampling would exceed the maximum clock ratio.

Is 0x0271 written directly to USART1->BRR in bare-metal C?

Yes, in 16× oversampling mode (OVER8=0), bits [15:4] hold the mantissa (39) and bits [3:0] hold the 1/16th fraction (1), so `USART1->BRR = 0x0271;`.