RP2040 125MHz PL011 UART IBRD & FBRD Register Calculator

Compute exact Raspberry Pi Pico RP2040 125 MHz ARM PL011 UARTIBRD and UARTFBRD 6-bit fractional divider registers and bit error %.

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.006%
Actual synthesized baud
115,207.4 bps
Prescaler register
IBRD = 67, FBRD = 52
Ideal vs. actual divisor
67.817 → 67.813
Stop-bit worst-case drift
0.12% 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.006% · Stop-bit worst-case drift: 0.12% of 1 bit
Standard baud rates at this clock
Target bpsActual bpsRegisterError %Status
9,6009,600.1IBRD = 813, FBRD = 51+6.40e-4%Pass (reliable)
19,20019,199.8IBRD = 406, FBRD = 58-1.28e-3%Pass (reliable)
38,40038,399.5IBRD = 203, FBRD = 29-1.28e-3%Pass (reliable)
57,60057,597.1IBRD = 135, FBRD = 41-5.12e-3%Pass (reliable)
115,200115,207.4IBRD = 67, FBRD = 52+6.40e-3%Pass (reliable)
230,400230,414.7IBRD = 33, FBRD = 58+6.40e-3%Pass (reliable)
460,800460,829.5IBRD = 16, FBRD = 61+6.40e-3%Pass (reliable)
921,600920,810.3IBRD = 8, FBRD = 31-0.09%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.

Compute ARM PL011 UARTIBRD and UARTFBRD registers for RP2040

The Raspberry Pi RP2040 integrates two ARM PrimeCell PL011 UARTs clocked by default from the 125 MHz `clk_peri`. Its 6-bit fractional baud-rate register (`UARTFBRD`) divides in 1/64th steps, giving four times finer granularity than 4-bit fractional UARTs.

Enter any standard or custom baud rate (including DMX512 250 kbps or MIDI 31,250 bps) to read out exact `IBRD` and `FBRD` register values immediately.

Formulas

  • Divisor = 125,000,000 ÷ (16 × Baud)
  • IBRD = floor(Divisor); FBRD = round((Divisor − IBRD) × 64)
  • 115,200 bps → Divisor = 67.8168 → IBRD = 67, FBRD = 52

Worked example

At 125 MHz and 115,200 bps, `IBRD = 67` and `FBRD = 52` yield 115,207.4 bps (+0.006% error). Even at 921,600 bps, error stays under 0.05%.

Frequently asked questions

What happens if FBRD rounds up to 64 on RP2040?

Increment IBRD by 1 and set FBRD to 0—this calculator handles carry propagation automatically so register values are always legal.

Do I need to write UARTLCR_H after updating IBRD and FBRD?

Yes! On ARM PL011 hardware, new UARTIBRD and UARTFBRD values are double-buffered and only latch into the baud generator upon a subsequent write to UARTLCR_H.

What is the maximum UART baud rate on a 125 MHz RP2040?

With 16× oversampling and minimum IBRD = 1, the PL011 ceiling is 125 MHz / 16 = 7.8125 Mbps.