The two most-discussed microcontrollers in the UAV hobbyist and professional community are the STM32 series from STMicroelectronics and the ESP32 from Espressif. Both are powerful, affordable, and well-supported — but they are designed with very different priorities in mind.
Architecture Overview
STM32: Purpose-Built for Real-Time Control
STM32 MCUs are based on the ARM Cortex-M core (M0, M3, M4, M7, M33 depending on series). The STM32F4 series (e.g. STM32F405RGT6) runs at 168 MHz with a hardware FPU (Floating-Point Unit), making it ideal for PID control loops that run at 1–8 kHz. The STM32F7 steps up to 216 MHz, while the STM32H7 reaches 480 MHz with dual-core support.
Key peripherals for flight control include: up to 17 timers (PWM generation, input capture for SBUS/PPM), multiple SPI/I2C/UART buses, DMA controllers, and hardware CRC. The HAL and LL libraries are mature, and open-source flight stacks like Betaflight, ArduPilot, and PX4 all run natively on STM32.
ESP32: Wi-Fi + Bluetooth First, Real-Time Second
The ESP32 is a dual-core Xtensa LX6 (or RISC-V in ESP32-C3/C6/H2 variants) running at 240 MHz. It has built-in Wi-Fi 802.11b/g/n and Bluetooth 4.2/5.0 — making it a natural choice for IoT, home automation, and wireless sensor nodes.
While ESP32 has timers and PWM capability, the FreeRTOS-based architecture and Wi-Fi interrupt load introduce latency jitter that is problematic for precise flight control loops. There is no hardware FPU on the original ESP32 (the ESP32-S3 does include one), and peripheral count is lower than comparable STM32 devices.
Performance Comparison Table
| Feature | STM32F405RGT6 | ESP32-D0WDQ6 |
|---|---|---|
| CPU Core | ARM Cortex-M4 | Xtensa LX6 (dual) |
| Max Clock | 168 MHz | 240 MHz |
| FPU | Yes (hardware) | No (software emulation) |
| Flash | 1 MB | None (external required) |
| SRAM | 192 KB | 520 KB |
| Timers | 17 (advanced + basic) | 4 (hardware) + LED PWM |
| SPI/I2C/UART | 3/3/6 | 4/2/3 |
| Wi-Fi / BT | No | Yes (both) |
| Real-time OS support | FreeRTOS, ChibiOS, Zephyr | FreeRTOS (ESP-IDF) |
| Betaflight/PX4 support | ✅ Full support | ❌ Not supported |
Real-Time Performance: Why It Matters for Drones
A flight controller must execute its attitude estimation and PID control loop at a consistent interval — typically 1 kHz for brushless motor control, or up to 8 kHz for racing drones running Betaflight. Any jitter in loop timing results in oscillations, reduced PID performance, or propwash.
The STM32 achieves this with deterministic interrupt handling, dedicated DMA for IMU data transfers, and no competing high-speed peripherals like Wi-Fi. The ESP32's Wi-Fi stack runs at high priority and regularly preempts user tasks, introducing unpredictable delays of 1–10 ms — unacceptable for any flight critical loop.
When Should You Use ESP32 in a Drone?
ESP32 is not a bad chip — it's just a bad flight controller chip. It excels in the following drone-adjacent roles:
- Ground station / companion computer: Wi-Fi bridge to GCS software (Mission Planner, QGC)
- Video transmission auxiliary board: Low-latency telemetry relay over Wi-Fi or BLE
- Payload controller: Camera gimbal command processing where millisecond jitter is tolerable
- Educational platforms: Teaching microcontroller basics with built-in wireless
For any of these applications, ESP32 is an excellent choice because its connectivity strengths are an asset rather than a liability.
Which STM32 Variant Is Right for Your Drone?
Within the STM32 family, different variants suit different build types:
- STM32F405RGT6: The industry standard for 4–7 inch FPV quads. Used in Kakute F4, OMNIBUSF4, and many others. Best balance of performance and cost.
- STM32F7 (722/745/765): Better for larger aircraft needing more RAM (>192 KB) or faster math, e.g. fixed-wing with complex mixing.
- STM32H7 (743/750): Cutting-edge performance for custom VTOL or autonomous UAS with sensor fusion requirements. Overkill for typical FPV.
- STM32G4 series: Mixed-signal MCU with advanced motor control PWM, ideal for ESC firmware development.
Community and Toolchain Support
Both platforms have excellent open-source ecosystems. STM32CubeIDE, STM32CubeMX, and PlatformIO all support STM32. The ESP-IDF and Arduino framework support ESP32. However, for flight control specifically, STM32 dominates: Betaflight, Cleanflight, iNav, PX4, and ArduPilot all either require STM32 or primarily target it.
If your project involves a custom flight controller PCB, you will find far more reference designs, schematics, and community Q&A for STM32-based boards.
Cost Comparison
At UAVCHIP, both chips are stocked in volume. The STM32F405RGT6 runs approximately $4–8 USD in small quantities, while the ESP32-D0WDQ6 is $3–5 USD. For production volumes of 1000+, both are under $3 USD. The cost difference is not a deciding factor — performance and ecosystem fit should drive the decision.
Conclusion: Use STM32 for Flight Control
If you are building a flight controller — whether it's an FPV racing quad, an autonomous agricultural sprayer, or a fixed-wing mapping drone — STM32 is the correct choice. The hardware FPU, deterministic interrupt latency, rich timer peripherals, and full support in all major open-source flight stacks make it the clear winner for this application domain.
Reserve ESP32 for companion boards, wireless bridges, and payload controllers where its connectivity shines. Used in the right role, both chips are excellent. Used in the wrong role, both will let you down.
Need STM32 or ESP32 for Your UAV Project?
UAVCHIP stocks genuine STM32F4, F7, H7 series chips with full traceability. Submit an RFQ or email our team for pricing and availability.
View STM32F405RGT6 Submit RFQFrequently Asked Questions
No. Betaflight requires STM32 hardware, specifically STM32F4 or newer. The ESP32 architecture is not compatible with Betaflight's hardware abstraction layer. There are unofficial ports and minimal forks, but none are production-ready or safe for actual flight.
Generally no — it's overkill for most FPV applications. The STM32F405 is sufficient for 8 kHz Betaflight loops. The H743 makes more sense for custom autopilots with heavy sensor fusion (lidar, optical flow, dual IMU), complex VTOL mixing, or when you need the additional RAM for feature-rich firmware builds.
STM32F7 features a Cortex-M7 core with a 6-stage superscalar pipeline and runs at up to 216 MHz (vs 168 MHz for F4). It also includes an L1 cache, ART accelerator, and more RAM. For flight controllers, the F7 mainly benefits designs needing large logging buffers, complex GPS waypoint missions, or heavy filtering algorithms. For basic racing firmware, F4 is sufficient.
UAVCHIP specializes in genuine STM32 components for UAV manufacturers. We stock the most common flight controller MCUs including STM32F405RGT6, STM32F722RET6, STM32F745VGT6, and STM32H743VIT6. All parts come with full test reports and batch traceability.