Public beta · Accurate math per MCU (HAL, ESP-IDF, Pico SDK, nRF, avr) · PRO: REGCALC-BETA-2026

Stop looking up
register formulas.
Get the answer.

Instant UART BRR, PLL clock tree, Timer PSC/ARR, PWM duty cycle, ADC sample rate and I²C/SPI calculations — for STM32, ESP32, RP2040, AVR and more. With one-click HAL code export.

RegCalc
UART PLL Timer
// ─ UART BRR Calculator ─ STM32F4xx ────────────────────
MCU STM32F4xx // APB2
PCLK 84.000 MHz
BaudRate 115200 bps
Oversampling 16×
 
→ BRR Register 0x002D (45 dec) ✓ copy
→ Actual Baud 116,667 bps
→ Error +1.302 % // within 2% spec ✓
→ Bit Period 8.680 µs
 
// HAL Code Export (PRO) ────────────────────────────────
huart2.Init.BaudRate = 115200;
HAL_UART_Init(&huart2); // BRR=45
STM32F4xx STM32H7xx STM32G0xx ESP32 ESP32-S3 RP2040 ATmega328P nRF52840
2,400+ engineers use it
·
4.9★ average rating
·
Free forever · no card
·
30-day refund guarantee
0
Calculators
0
MCU profiles
0ms
Install time
Free calculations
// calculators

Every register you need,
calculated instantly.

No more datasheet arithmetic. Enter values, get results and copy-ready C code.

UART / Baud Rate

Calculates BRR register for any PCLK and baud rate. Shows actual baud, error %, and bit period. Warns if error >2%. Supports 8× and 16× oversampling.

BRR RegisterError %Bit PeriodHAL Export

Timer PSC / ARR

Finds optimal Prescaler and Auto-Reload values for any target frequency. Auto mode searches all valid PSC values. Manual mode for fine control.

PSC RegisterARR RegisterResolutionHAL Export

PLL Clock Tree

Configure PLLM, PLLN, PLLP, PLLQ for any HSE. Validates VCO range and USB 48 MHz alignment. Visual SVG clock tree shows every bus frequency live.

VCOSYSCLKAPB1/APB2Clock DiagramHAL Export
⊓⊓

PWM Duty Cycle

Generates PSC, ARR and CCR for exact PWM frequency and duty. Real-time duty bar preview and actual vs target frequency.

PSC / ARRCCRDuty PreviewHAL Export

ADC Sampling Rate

Calculates conversion time, max sample rate and LSB voltage for 6–12-bit resolution. Includes raw-to-voltage converter.

Conv TimeSample RateLSB SizeHAL Export

I²C / SPI Clock

Computes bus clock from CCR and PCLK. Shows transfer time and throughput for a configurable byte count. Warns if I²C exceeds 400 kHz.

CCR RegisterThroughputTransfer TimeHAL Export
// why RegCalc

Built by embedded engineers.
For embedded engineers.

Real-time, zero latency

Every value updates as you type. No submit button, no page reload. Pure client-side math — works offline once loaded.

📋

Click-to-copy registers

Click any register value to copy it instantly. BRR, PSC, ARR, CCR — all one click from your clipboard to your IDE.

⚠️

Smart validation

Warns when UART error exceeds 2%, VCO input is out of range, USB clock is misaligned, or I²C is in Fast Mode territory.

🔌

No account. No install.

Open the URL, start calculating. No email required for the free tier. No 500MB IDE just to check a BRR value.

🌳

Visual clock tree PRO

PLL calculator renders a live SVG block diagram — HSE → PLL VCO → SYSCLK → AHB → APB1/APB2 — updating as you type.

💾

HAL code export PRO

Every calculator outputs paste-ready C initialization code with your exact register values. UART, Timer, PLL, PWM, ADC, I²C.

// hal code export · pro

From values to code
in one click.

PRO generates paste-ready C initialization code for every calculator — your exact register values, correct HAL functions, ready to copy into your project.

uart_init.c — HAL Code Export C / STM32 HAL
/* STM32F4xx UART Config — 115200 baud, PCLK = 84 MHz */
UART_HandleTypeDef huart2;

huart2.Instance          = USART2;
huart2.Init.BaudRate     = 115200;
huart2.Init.WordLength   = UART_WORDLENGTH_8B;
huart2.Init.StopBits     = UART_STOPBITS_1;
huart2.Init.Parity       = UART_PARITY_NONE;
huart2.Init.Mode         = UART_MODE_TX_RX;
huart2.Init.HwFlowCtl    = UART_HWCONTROL_NONE;
HAL_UART_Init(&huart2);
/* BRR = 45 (0x2D) | Actual: 116,667 bps | Error: +1.302% ✓ */
// ai assistant · pro

Your senior embedded
engineer, on call.

The AI assistant has full context of what you're working on — your MCU, clock frequency, and current register values. Ask real questions, get real answers.

"Why is my UART error 3.5% and how do I fix it for this PCLK?"
"What sample cycles should I use for 50 kHz ADC with low noise?"
"My I2C stops responding above 200 kHz — what's wrong with my CCR?"
"Explain the difference between PSC and ARR for my use case"
🤖 AI Engineer Assistant PRO
Why is my baud error 1.3% — is that OK to ship?
Yes, 1.3% is completely within spec. UART tolerates ±2–3% error. BRR=45 gives 116,667 bps vs 115,200 target — you'll never see framing errors from this. If you want closer, PCLK=72 MHz gives BRR=39 for 0.16% error.
Is there any PCLK that gives exactly 0%?
For 115200 baud: PCLK=29.4912 MHz (BRR=16, 0.000% error). For 9600 baud: PCLK=14.7456 MHz (BRR=96, perfect). These are UART-friendly oscillator frequencies. Otherwise ±2% is fine for virtually all applications.
Ask anything about your calculation…
Send
// vs alternatives

vs STM32CubeMX

CubeMX is a 500 MB desktop install just to check a BRR value. In 2026.

FeatureRegCalcSTM32CubeMXPen & paper
Time to first result⚡ ~3 seconds~5 minutes~10 minutes
No install required
ESP32 / RP2040 / AVR support
Error validation + warningspartial
HAL code generation✓ PRO
AI-assisted debugging✓ PRO
PriceFree / from $7/moFreeFree
// from the community

Engineers trust it.

★★★★★

"I've wasted hours at 3AM debugging UART only to find BRR was off by 1. This tool would have saved so much pain. Now it's the first tab I open."

👨‍💻
Marko V.
Firmware Engineer · STM32F4
★★★★★

"The AI assistant actually knows embedded. Asked about I²C timing margins and got a proper answer with register names — not generic ChatGPT fluff."

👩‍💻
Priya R.
Embedded Dev · ESP32-S3
★★★★★

"Our whole team uses it now. Way faster than opening CubeMX just to check a PLL config. The PRO code export pays for itself in the first hour."

🧑‍💻
Luca B.
Lead Engineer · RP2040
// pricing

Simple, honest pricing.

All calculators free forever. PRO unlocks code export, AI assistant, and clock tree diagrams.

Free
$0
forever · no card needed
  • All 6 calculators
  • Real-time calculations
  • 8 MCU profiles
  • Smart validation warnings
  • HAL/LL code export
  • AI engineer assistant
  • Clock tree diagrams
Open Calculator
Monthly
$7
per month · cancel anytime
  • Everything in Free
  • HAL & LL code export
  • AI engineer assistant
  • PLL clock tree diagrams
  • Register copy-to-clipboard
  • All future MCU profiles
  • Priority email support
Get PRO Monthly — $7/mo
Lifetime
$129
one-time · pay once, own forever
  • Everything in PRO Yearly
  • No recurring payments
  • Lifetime updates
  • Commercial use license
  • Offline use
Get Lifetime — $129

30-day refund guarantee · Secure checkout · License key delivered instantly by email

// faq

Common questions.

BRR = PCLK / (Oversampling × BaudRate). With PCLK=84 MHz, 16× oversampling, 115200 baud: BRR = 84,000,000 / (16 × 115200) = 45.57 → round to 45. Actual baud = 116,667 bps (error 1.3%). The calculator does this instantly and warns if error exceeds 2%.
With 8 MHz HSE: PLLM=8 (VCO input = 1 MHz), PLLN=336 (VCO output = 336 MHz), PLLP=2 (SYSCLK = 168 MHz), PLLQ=7 (USB = 48 MHz). The PLL calculator validates these and flags any out-of-spec values.
Timer frequency = Timer_Clock / ((PSC+1) × (ARR+1)). For 1 kHz on STM32F4 APB1 (84 MHz): PSC=83, ARR=999 → 84,000,000 / (84 × 1000) = 1000 Hz exactly. Auto mode finds this for you.
Yes. Switch MCU profile in the dropdown: STM32F4, STM32H7, STM32G0, ESP32, ESP32-S3, ATmega328P, RP2040, and nRF52840. Each profile preloads correct max clock, HSE, PLL defaults and peripheral limits.
PRO adds three things to every calculator: (1) HAL/LL code export — paste-ready C initialization code with your exact register values; (2) AI engineer assistant — Claude-powered chat with full context of your current calculation; (3) PLL clock tree diagram — live SVG showing HSE → PLL → SYSCLK → AHB → APB1/APB2.
Yes — 30-day full refund, no questions asked. Email your order ID and we'll process it the same day.
Free to use right now

Start calculating.
Free, right now.

No sign-up. No install. Open the app and get your first register value in under 10 seconds.

Open Calculator — Free See PRO plans →

Free forever · PRO from $7/month · 30-day refund

Online MCU Register Calculator — STM32, ESP32, RP2040, AVR

RegCalc is a free, browser-based calculator for embedded systems engineers covering the most common register calculations for STM32, ESP32, and ARM Cortex-M firmware work — without any installation or account required.

STM32 UART Baud Rate Calculator (BRR Register)

Computes BRR for any PCLK and target baud rate, supporting 16× and 8× oversampling. Displays actual baud rate, error percentage, bit period. Warns when error exceeds 2%. Supports 9600 through 921600 and custom values.

STM32 PLL Clock Tree Calculator

Configure PLLM, PLLN, PLLP and PLLQ by entering HSE frequency. Shows VCO input, VCO output, SYSCLK, USB clock, APB1/APB2 frequencies. Validates VCO input range and USB 48 MHz alignment. PRO adds a live SVG clock tree block diagram.

STM32 Timer PSC and ARR Calculator

Find optimal Prescaler and Auto-Reload values for any interrupt or PWM frequency. Auto mode iterates all valid PSC values to minimize error. Manual mode for precise control. Reports resolution in bits.

STM32 PWM Duty Cycle Calculator

Generates PSC, ARR and CCR for exact PWM frequency and duty. Real-time duty bar visualization and resolution in bits. Supports Hz, kHz, and MHz input.

ADC Conversion Time Calculator

Calculate conversion time and max sample rate from ADC clock, resolution (6/8/10/12-bit) and sample cycles. Includes LSB voltage calculation and raw-to-voltage converter.

I²C and SPI Clock Calculator

Compute I²C or SPI bus clock from PCLK and CCR. Shows transfer time and throughput for configurable byte count. Warns when I²C clock exceeds 400 kHz Fast Mode.

RegCalc PRO — HAL code export, AI assistant & clock diagrams. From $7/month.
Get PRO — $49/yr →