MCU Architectures
Microcontroller architecture defines how computation, memory, and peripherals are organized inside a chip. A strong understanding of MCU architecture helps you write efficient firmware, optimize power usage, and debug hardware-level issues during development and interviews.
What is an MCU?
A Microcontroller Unit (MCU) is a single-chip computer designed for dedicated control tasks. Unlike microprocessors, MCUs integrate CPU, memory, and peripherals on the same chip, making them ideal for embedded systems with real-time and low-power requirements.
Interview Insight: MCU vs MPU is a very common DEET question. MCU = single chip, real-time control. MPU = external memory, high performance.
Key MCU Components
- CPU Core: Executes instructions and controls program flow
- Flash Memory: Stores firmware permanently
- SRAM: Temporary storage for variables and stack
- Peripherals: GPIO, UART, SPI, I2C, ADC, Timers
- Bus System: Transfers data between CPU and peripherals
- Clock Unit: Controls execution speed and power consumption
ARM Cortex-M Architecture
ARM Cortex-M cores dominate the embedded industry due to their balance of performance, power efficiency, and strong ecosystem support. They use a modified Harvard architecture and execute compact Thumb-2 instructions.
Cortex-M Variants
| Core | Pipeline | Key Feature | Typical Use |
|---|---|---|---|
| M0/M0+ | 2-stage | Ultra-low power | Sensors, wearables |
| M3 | 3-stage | General purpose | Industrial control |
| M4 | 3-stage | DSP + optional FPU | Motor control |
| M7 | 6-stage | High performance | Graphics, RTOS |
| M33 | 3-stage | TrustZone security | Secure IoT |
Register Architecture (ARM)
ARM Cortex-M uses a small but powerful register set optimized for fast context switching and interrupt handling.
- R0–R12: General purpose
- R13: Stack Pointer (MSP / PSP)
- R14: Link Register
- R15: Program Counter
- xPSR: Status and flags
RISC-V Architecture
RISC-V is an open instruction set architecture designed to be simple, modular, and free from licensing restrictions. This openness allows companies and universities to design custom processors.
Why RISC-V Matters
- No license or royalty cost
- Custom instruction extensions
- Growing ecosystem and toolchains
- Increasing adoption in MCUs
Memory Architecture
Memory organization determines how instructions and data are accessed. Embedded developers must understand memory maps to write drivers and linker scripts.
Harvard vs Von Neumann
- Von Neumann: Single bus, simpler design
- Harvard: Separate instruction and data buses
- Modified Harvard: Used in Cortex-M MCUs
Boot Process
The boot sequence defines how the MCU starts execution after reset or power-on. Understanding this helps in startup code debugging.
- Load initial stack pointer
- Load reset handler address
- Initialize memory sections
- Configure clocks
- Jump to main()
Clock System
Clock configuration impacts execution speed, timing accuracy, and power consumption. Most MCUs provide internal and external clock sources combined with PLLs.
Popular MCU Families
STM32 ESP32 nRF52 RP2040 LPC SAMD
Final Takeaway: MCU architecture knowledge is foundational for embedded systems. Master one architecture deeply before moving to others—this is exactly what DEET interviews test.