</>EmbeddedInterview

What is the difference between a microcontroller and a microprocessor?

EasyMicrocontrollers & ARM Cortex-M

Short answer: A microcontroller (MCU) integrates the CPU, flash, RAM and peripherals (timers, UART, SPI, I2C, ADC, GPIO) on one chip, designed for a dedicated control task with low cost and low power; it usually runs bare metal or an RTOS. A microprocessor (or application processor / SoC) is built around a more powerful CPU with an MMU and caches, uses external DRAM and storage, and typically runs a full OS such as Linux or Android.

Microcontroller Microprocessor / application SoC
Example cores Cortex-M0+/M4/M7/M33, RISC-V RV32 Cortex-A53/A55/A72, x86
Memory on-chip flash (KB–few MB) and SRAM (KB–1 MB) external DRAM (hundreds of MB–GB), eMMC/UFS
MMU no (MPU at most) yes
Typical OS none, FreeRTOS, Zephyr Linux, Android, QNX
Clock tens to hundreds of MHz 1–3 GHz, multi-core
Power µA in sleep, mA active hundreds of mA to watts
Boot time microseconds to milliseconds seconds
Real-time behaviour deterministic needs special care (PREEMPT_RT)
Cost cents to a few dollars several dollars upward, plus DRAM, PMIC

Examples: STM32F4 (Cortex-M4 MCU), nRF52840 (Cortex-M4 with Bluetooth), i.MX 8M (Cortex-A53 SoC), Raspberry Pi's BCM2711 (Cortex-A72).

The line is blurring: many SoCs combine both, e.g. i.MX 8M Plus or STM32MP1 have Cortex-A cores for Linux plus a Cortex-M core for real-time I/O, and high-end MCUs (Cortex-M7 at 600 MHz–1 GHz, Cortex-M85) approach small application processors.

How to choose in an interview answer: an MCU for hard real-time control, battery operation, instant start and low cost; an application processor when you need rich UI, networking stacks, large memory, Linux software and processing power.