>
section 1 of 186 min read

1. What an Embedded System Actually Is

1.1 Toaster vs PC

Hold a laptop in one hand and a digital toaster in the other and ask: what is different? Both have CPUs. Both have RAM. Both run software. Yet they are completely different beasts.

A laptop is a general-purpose computer. You can install a browser, then a game, then a compiler, then a video editor. It has gigabytes of memory, a fan to keep cool, a battery that lasts hours, and a user who is OK with a reboot if the system gets stuck. Software is updated weekly. The hardware is built to handle whatever workload arrives.

A toaster has a microcontroller with maybe 8 KB of flash and 1 KB of RAM. It runs a single program, burned in at the factory, that watches a thermistor and a button and decides when to switch off the heating element. It has no fan, no display, no operating system in the conventional sense. The user expects ten years of use without thinking about the firmware. If the toaster crashes, smoke alarms might go off. There is no "rebooting the toaster."

That contrast is the whole spirit of embedded design: single purpose, resource constrained, reliable, long-lived, often safety relevant. Every other property cascades from those four.

1.2 The four constraints, in detail

Real-time. Many embedded systems must respond within a deadline. A car's anti-lock braking ECU has roughly 5 ms to decide whether to release pressure on a wheel. An audio codec has 22.7 microseconds to feed the next sample at 44.1 kHz. A motor controller might need 10 microseconds. Missing the deadline does not just slow the system, it breaks it. We distinguish hard real-time (missed deadline = catastrophe: ABS, pacemaker, flight control) from soft real-time (missed deadline = degradation: video glitch, late UI redraw).

Resource-constrained. A typical Cortex-M0 has 16-64 KB flash and 4-16 KB RAM. There is no virtual memory, no swap, no malloc-and-pray. Every byte you allocate, you allocate forever, and you knew its address at compile time. A sloppy "let's just buffer everything" attitude collapses immediately. Engineers learn to think in fixed pools, ring buffers, and static allocation.

Reliability. A pacemaker is implanted for ten years. A satellite cannot be rebooted by a tech. A car ECU sees temperatures from -40 °C to +125 °C, vibration, EMI from spark plugs. An industrial PLC runs 24/7 for thirty years on a factory floor. The MTBF target is often millions of hours. This drives watchdogs, redundant sensors, ECC memory, software safety standards (IEC 61508, ISO 26262, DO-178C, IEC 62304).

Long lifespan. Cars sold today still have the same ECU running in 2040. Industrial control systems from 1995 are still in operation. Code lifetimes of 20-30 years are common, while a phone app dies in 18 months. This shapes language choice (C, because it will compile in 2040), source-control discipline, parts-availability planning, and security thinking. A bug shipped today is in the field for decades.

1.3 Classifications

By complexity:

  • Small-scale embedded. 8-bit or 16-bit MCU, often <32 KB code. Super-loop firmware, no OS. Examples: TV remote, washing-machine front panel, BLDC fan controller, simple thermostat. Microchip PIC, Atmel AVR (the original Arduino chip), Renesas RL78.
  • Medium-scale embedded. 32-bit MCU (often Cortex-M0/M3/M4/M33), 64-512 KB flash, RTOS. Smart sensors, motor drives, drones, fitness trackers, smart locks. STM32F4, NXP LPC, Nordic nRF52, ESP32.
  • Sophisticated embedded. 32/64-bit application processor (Cortex-A), Linux or QNX, hundreds of MB to GB of memory, often a GPU or NPU. Smart TV, automotive infotainment, network router, industrial vision system. NXP i.MX, NVIDIA Jetson, Qualcomm Snapdragon, Tesla FSD chip.

By interaction:

  • Standalone. Runs without external coordination. A pocket calculator, a digital alarm clock.
  • Networked. Connected to other devices via wired or wireless. IoT thermostat talking to a cloud, a CAN-bus ECU in a vehicle.
  • Mobile. Battery-operated, carried by a human. Wearable, fitness tracker, hearing aid, smartwatch. Power and form factor dominate the design.
  • Real-time embedded. Hard deadlines define success. Brake ECU, motor controller, flight control. Often standalone or networked over a deterministic bus (CAN, EtherCAT, TTP).

These classes are not mutually exclusive: a smartwatch is medium-scale, networked, mobile, and soft real-time at once.

1.4 Application areas

Embedded systems are not a niche, they are most of the computers in the world. By volume, ARM ships about 30 billion cores per year, the vast majority in microcontrollers and embedded SoCs.

  • Consumer. TV, microwave, washer, dishwasher, vacuum, smart speaker, toy, e-reader. High volume, brutal cost pressure (cents matter), short product cycle.
  • Automotive. A modern car has 70 to 150 ECUs. Engine management (powertrain), body control (windows, lights, seats), ADAS (lane keeping, AEB), infotainment, telematics. Subject to ISO 26262 (functional safety) up to ASIL-D, typically AUTOSAR-based.
  • Industrial. PLCs, robots, CNC, motor drives, instrumentation. IEC 61508 SIL 1-3. Often networked over PROFINET, EtherCAT, Modbus.
  • Medical. Pacemakers, infusion pumps, MRI control, ventilators, glucose monitors. IEC 62304, FDA Class II/III. Years-long battery life on coin cells, redundant designs, traceable software.
  • Aerospace and defense. Flight control, avionics, missile guidance, satellite buses. DO-178C software certification, radiation-hardened parts.
  • Telecom. Modems, routers, base stations, optical transponders. Often Linux-based, often embedded Linux on ARM or PowerPC.
  • IoT. Smart bulbs, sensors, gateways, asset trackers, agricultural monitors, smart meters. Wi-Fi, BLE, Zigbee, LoRa, NB-IoT. Often power and security constrained.

1.5 The typical block diagram

plaintext
        +------------------------------------------+
        |              Embedded System             |
        |                                          |
   +----+--+  +-------+   +--------+  +---------+  |
   | Sensors|->| Sig.  |->|  ADC  |->| Processor|->| Actuators
   | (T,P,a)|  | cond. |  +--------+  |  + RAM   |  | (motor,
   +-------+   | (op-amp,           |  |  + Flash|  |  relay,
               |  filter)          |  |  +periph |  |  display)
               +--------+         |  +---------+  |
                                  |       |        |
                                  v       v        |
                              +--------+  |        |
                              | UART/SPI| | Wireless|
                              |  /I2C   | | (BLE,   |
                              +--------+  | Wi-Fi)  |
                                          +---------+
        |              ^                            |
        |              |    +-------+   +--------+  |
        |              +----| Power |<--|Battery |  |
        |                   | mgmt  |   |/Wall   |  |
        |                   +-------+   +--------+  |
        +------------------------------------------+

The processor is the brain. Memory stores code (Flash) and data (SRAM). Sensors turn the physical world into electrical signals. Signal conditioning amplifies and filters them. ADC/DAC bridge analog and digital worlds. Actuators turn digital decisions back into motion, light, sound. Communication moves data on and off the device. Power management keeps everything alive on a tight energy budget. Firmware ties it all together.

1.6 Quality attributes you trade against

Embedded design is choosing among:

  • Performance. MIPS, latency, throughput. More implies bigger CPU, more power.
  • Power. Active and sleep current. More performance usually costs more power.
  • Cost. BoM matters. A penny saved on 10 million units is $100,000.
  • Reliability. MTBF, fault tolerance. Pushes toward redundancy and watchdogs, costs power and money.
  • Safety. Will the device hurt anyone if it fails?
  • Maintainability. Can a future engineer (or attacker) understand the code?
  • Security. Resistance to remote and physical attack.
  • Time-to-market. Months saved are competitive advantage. Often pushes toward off-the-shelf modules over fully custom hardware.

You cannot maximize all of them. Picking the right trade-off is the engineer's job.