Embedded Systems
Embedded systems are computers built into a larger product — engine controllers, washing machines, drones, medical pumps, industrial sensors. They run a focused job under hard constraints on power, cost, and time.
Overview
Embedded engineers live close to the metal: registers, interrupts, DMA, watchdogs, bootloaders. The reward is determinism — you can usually account for every cycle.
Microcontrollers
- ARM Cortex-M — M0/M0+/M3/M4/M7/M33 (STM32, NXP Kinetis, Nordic nRF, Microchip SAM).
- RISC-V — ESP32-C3/C6, GD32V, SiFive.
- AVR — ATmega, ATtiny (Arduino).
- PIC — Microchip PIC16/18/24/32.
- Espressif — ESP32 / ESP8266 with Wi-Fi/BLE.
- SoCs / SoMs — i.MX, Zynq, Jetson when you need Linux.
Peripherals & Buses
- GPIO, pull-ups, open-drain.
- UART — async serial; baud, parity, stop bits.
- SPI — full-duplex master/slave; MISO/MOSI/SCK/CS.
- I²C — 2-wire multi-drop; 7- or 10-bit addressing.
- CAN / CAN FD — automotive & industrial multi-master.
- USB — Full/High/Super speed; CDC, HID classes.
- ADC / DAC, PWM, timers, RTC.
RTOS & Bare-Metal
- Bare-metal — super-loop or event-driven; simplest, hardest to grow.
- RTOS — FreeRTOS, Zephyr, ThreadX (Azure RTOS), RTEMS, ChibiOS, NuttX.
- Preemptive scheduling; priority inversion via priority inheritance.
- Synchronization — mutex, semaphore, queue, event flags.
Firmware Practices
- Bootloader + application; A/B partitions for safe OTA.
- Watchdog timers + brown-out detect.
- Defensive I/O — saturate, debounce, range-check.
- HAL / driver split; mock hardware for unit tests.
- MISRA C / CERT C for safety-critical code.
Tools
- IDEs: STM32CubeIDE, MPLAB X, PlatformIO, Keil μVision, IAR EWARM.
- Debug: J-Link, ST-Link, Black Magic Probe, OpenOCD, GDB.
- Analysis: Saleae logic analyzer, Bus Pirate, oscilloscope.
- Toolchain: arm-none-eabi-gcc, LLVM.