Skip to main content
Firmware & Software
STM32ESP32nRF52MicrocontrollerIoTEmbedded SystemsMCU Selection

STM32 vs ESP32 vs nRF52: Choosing the Right MCU for Your IoT Project

13 min read
Aditya Chilka, Founder & CEO at Rapid Circuitry
Aditya Chilka·Founder & CEO
·
STM32 vs ESP32 vs nRF52: Choosing the Right MCU for Your IoT Project - Featured image for Rapid Circuitry blog article
<article class="prose prose-invert max-w-none">
  <p class="lead">
    STM32, ESP32, and nRF52 are three of the most widely used microcontroller families in IoT and <a href="/services/embedded-hardware">embedded systems</a> today. Each has a distinct strength profile. Understanding these differences can save you significant rework later — choosing the wrong MCU often means a complete hardware redesign.
  </p>

  <h2>Quick Comparison Overview</h2>
  <p>
    Before diving into details, here's the high-level profile of each family:
  </p>
  <ul>
    <li><strong>STM32</strong>: Broad, professional-grade MCU family. Best for compute-intensive, real-time, or industrial applications without onboard RF. Widest peripheral set.</li>
    <li><strong>ESP32</strong>: Wi-Fi + Bluetooth combo in one chip. Best for cloud-connected IoT where power consumption is secondary to connectivity and cost.</li>
    <li><strong>nRF52</strong>: Ultra-low-power Bluetooth LE (and in nRF5340, also BT + 802.15.4). Best for battery-powered BLE devices needing years of runtime.</li>
  </ul>

  <h2>STM32: The Professional Workhorse</h2>
  <p>
    STMicroelectronics' STM32 family spans from the ultra-low-power STM32L0 (running at 32 MHz, 1.8V) to the STM32H7 (480 MHz Cortex-M7 with DSP and FPU). This breadth is both a strength and a complexity.
  </p>
  <p>
    STM32 is the go-to choice when you need:
  </p>
  <ul>
    <li>Real-time determinism with hardware FPU and DSP instructions (motor control, signal processing)</li>
    <li>Rich peripheral set: multiple CANs, USB OTG, SAI audio, SDIO, crypto accelerators</li>
    <li>Industrial temperature range (-40°C to +85°C or +105°C) with AEC-Q100 automotive grades available</li>
    <li>HAL and bare-metal ecosystem with STM32CubeIDE and STM32CubeMX for code generation</li>
    <li>Deterministic RTOS with FreeRTOS or CMSIS-RTOS integration</li>
  </ul>
  <p>
    STM32's weakness: no onboard RF. If you need wireless, you're adding a separate radio module (ESP8266, nRF52, SiLabs EFR32), which adds BOM cost and PCB complexity.
  </p>

  <h2>ESP32: The Connected Platform</h2>
  <p>
    Espressif's ESP32 integrates dual-core Xtensa LX6 (or RISC-V on ESP32-C series), Wi-Fi 802.11b/g/n, and Bluetooth Classic/BLE in a single package at a price point of $2–4 USD in small quantities. This makes it one of the most cost-effective ways to add Wi-Fi connectivity to an <a href="/services/iot-solutions">IoT product</a>.
  </p>
  <p>
    ESP32 excels when:
  </p>
  <ul>
    <li>Wi-Fi connectivity is required and power consumption is manageable (mains-powered or larger battery)</li>
    <li>Rapid prototyping speed matters more than production optimization</li>
    <li>Arduino or ESP-IDF ecosystem fits your firmware team's skills</li>
    <li>BOM cost minimization is a priority at moderate volumes</li>
    <li>OTA firmware updates over Wi-Fi are needed (built-in flash partition scheme)</li>
  </ul>
  <p>
    ESP32's limitations: higher active current (100–240 mA during Wi-Fi transmit), less deterministic real-time performance than Cortex-M STM32, and historically less rigorous quality for safety-critical applications. The newer ESP32-S3 improves on many of these.
  </p>

  <h2>nRF52: The Ultra-Low-Power BLE Leader</h2>
  <p>
    Nordic Semiconductor's nRF52 series (nRF52832, nRF52840) combines a Cortex-M4F MCU with a best-in-class Bluetooth LE radio. The nRF52840 adds USB and 802.15.4 (Thread/Zigbee) support. The nRF5340 is a dual-core successor with BLE 5.3 and dedicated application + network processors.
  </p>
  <p>
    nRF52 is the right choice when:
  </p>
  <ul>
    <li>Battery life is the primary constraint — coin cell or small LiPo, 1–5 year targets</li>
    <li>Bluetooth LE is your primary wireless protocol (beacons, wearables, medical devices, asset tracking)</li>
    <li>Thread or Zigbee mesh networking is needed (nRF52840)</li>
    <li>BLE audio (Auracast/LE Audio) is required (nRF5340)</li>
    <li>Security is a priority — nRF52 has ARM TrustZone, crypto accelerators, secure key storage</li>
  </ul>
  <p>
    nRF52 limitations: BLE range is limited (10–100m typical); no Wi-Fi onboard requires a separate module; Nordic's SDK (nRF5 SDK and newer nRF Connect SDK / Zephyr RTOS) has a steeper learning curve than ESP-IDF or Arduino.
  </p>

  <h2>Side-by-Side: Power Consumption</h2>
  <p>
    Power is where the differences are starkest. Typical values for representative members of each family in active/sleep modes:
  </p>
  <ul>
    <li><strong>STM32L4 (active @ 80 MHz)</strong>: ~4.3 mA; stop2 sleep: ~30 nA</li>
    <li><strong>ESP32 (modem sleep, Wi-Fi on)</strong>: ~20 mA; deep sleep: ~10 µA</li>
    <li><strong>nRF52840 (BLE advertising)</strong>: ~4.6 mA peak, ~1.5 µA average at 1 adv/second; system-off: ~0.7 µA</li>
  </ul>
  <p>
    For a coin cell (CR2032, ~235 mAh) sending BLE beacons once per second, an nRF52840 can run for over 10 years. An ESP32 in Wi-Fi mode would drain the same cell in under a day.
  </p>

  <h2>Ecosystem & Development Experience</h2>
  <p>
    All three have strong ecosystems, but they differ in flavor:
  </p>
  <ul>
    <li><strong>STM32</strong>: STM32CubeIDE, STM32CubeMX (graphical pin/clock config), HAL + LL libraries, extensive reference manuals. Steeper initial curve but the most professional-grade tooling.</li>
    <li><strong>ESP32</strong>: ESP-IDF (FreeRTOS-based C SDK) or Arduino. Massive community, extensive GitHub examples, Platformio support. Fastest time to blinking LED.</li>
    <li><strong>nRF52</strong>: nRF Connect SDK (Zephyr RTOS-based), nRF5 SDK (legacy). Nordic's documentation quality is excellent. Zephyr is powerful but has a significant learning curve for teams new to it.</li>
  </ul>

  <h2>Which Should You Choose?</h2>
  <p>Use this decision tree:</p>
  <ul>
    <li>Need Wi-Fi + fast prototype + moderate power budget? → <strong>ESP32</strong></li>
    <li>Need BLE + multi-year battery life + coins cell or small LiPo? → <strong>nRF52</strong></li>
    <li>Need compute performance, rich peripherals, industrial grade, no onboard RF? → <strong>STM32</strong></li>
    <li>Need BLE + compute + USB + Thread/Zigbee? → <strong>nRF52840</strong></li>
    <li>Need Wi-Fi + BLE + edge AI inference? → <strong>ESP32-S3</strong></li>
  </ul>
  <p>
    If you're unsure, the fastest path to the right answer is a quick architecture review with an experienced <a href="/services/embedded-hardware">embedded hardware team</a>. Wrong MCU selection is one of the most expensive mistakes to correct mid-design.
  </p>
</article>

Need help with firmware & software?

Get a free consultation with our expert engineers. We respond within 24 hours.

Get a Free Consultation

Stay in the Loop

Subscribe to our newsletter for the latest updates and insights.

By subscribing, you agree to our Privacy Policy. You can unsubscribe at any time.

STM32 vs ESP32 vs nRF52: Choosing the Right MCU for Your IoT Project | Rapid Circuitry Blog