Independent learning for embedded-systems engineersHardware · Firmware · Software
TEA-101CORE EMBEDDED SYSTEMS TOPICFOUNDATION

Embedded systems architecture

Define the system before dividing the work: boundaries, behaviours, interfaces and failure responses that keep hardware, firmware and software aligned.

After this module, you should be able to:

  • Describe an embedded system from its external behaviour
  • Choose boundaries and allocate responsibilities deliberately
  • Write useful interface contracts
  • Identify the evidence an architecture must produce

Study guide · Updated · About 9 minutes reading + 20–30 minutes practice

Before you start: No previous Academy module is required. Familiarity with a sensor, controller and actuator will help.

01 / SYSTEM VIEW

Architecture is the set of decisions that make the system understandable.

An architecture is more than a block diagram. It explains what lies inside the system boundary, what the system must do, how responsibilities are divided, how elements interact and which constraints shape those decisions.

For an embedded product, the important boundaries are rarely identical to organisational boundaries. A behaviour such as “stop the motor safely when position feedback is lost” may depend on a sensor, analogue conditioning, an MCU peripheral, an interrupt, firmware state logic, a power stage and the mechanical load.

CONTEXTWhat surrounds the product?Users, equipment, environment, power, networks and physical processes
BEHAVIOURWhat must happen?Normal operation, transitions, degraded modes and safe responses
STRUCTUREWhere is it realised?Hardware, firmware, software and external services
Architecture is a reasoning aid.If a diagram cannot help an engineer predict behaviour, analyse a failure or plan verification, it is probably describing inventory rather than architecture.
02 / CORE DECISIONS

Make the consequential decisions explicit.

DecisionQuestions to answerTypical output
System boundaryWhat is controlled, assumed or external? Where do power, data and physical effects cross?Context diagram and assumptions
Functional allocationWhich element senses, decides, acts, monitors and records?Function-to-element allocation
State and mode controlWhat modes exist? Which transitions are permitted? What happens after interruption?State model and transition rules
Interface contractsWhat is exchanged, when, in what units and with what response to invalid or missing data?Interface specification
Cross-cutting qualitiesWhat timing, safety, security, power, diagnostic and reliability properties span components?Budgets, principles and constraints
Change boundariesWhich parts must evolve independently? Where is compatibility controlled?Versioning and configuration strategy

A useful interface contract is testable

“MCU communicates with sensor” is not a contract. State the physical interface, direction, data representation, range, units, timing, initialisation, ownership, timeout, error detection and response to corrupted, stale or unavailable data.

03 / METHOD

Build the architecture from behaviour, not from the parts catalogue.

  1. Set the context. Identify external actors, physical processes, energy sources and trust boundaries.
  2. Walk critical scenarios. Trace start-up, normal operation, shutdown, update, service and credible fault conditions.
  3. Partition responsibilities. Allocate sensing, decisions, actuation, monitoring and data retention.
  4. Define interface contracts. Include timing, validity, ownership and failure behaviour.
  5. Apply system budgets. Allocate timing, accuracy, memory, power and diagnostic coverage.
  6. Challenge the design. Examine single failures, common causes, communication loss and unexpected sequences.
  7. Connect verification. Decide how each important architectural claim will be demonstrated.

Worked example: temperature-controlled chamber

The requirement is not simply “maintain 37 °C”. The architecture must explain how temperature is sensed, how plausibility is checked, how heater energy is controlled and what happens if readings stop changing.

Temperature sensorSignal acquisitionControl algorithmPWM outputPower driverHeaterIndependent cut-off

A robust allocation might use firmware for normal closed-loop control, a hardware watchdog for loss of execution and an independent thermal cut-off for an over-temperature condition that must remain controlled even when the MCU fails.

04 / EVIDENCE

Retain enough evidence to defend the architecture.

System context

External actors, interfaces, environmental constraints and explicit assumptions.

Architecture description

Views showing decomposition, allocation, data flow, control flow and deployment.

Interface definitions

Signals, protocols, units, timing, validity rules, errors and ownership.

Behaviour models

Modes, states, sequences, start-up, shutdown and fault responses.

Decision records

Alternatives, rationale, constraints and consequences of major choices.

Verification strategy

How architectural properties and interface behaviours will be tested or analysed.

Common failure patterns

Component-first architecture

The design begins with a preferred MCU or platform before system behaviours and constraints are understood.

Happy-path diagrams

Normal data flow is shown, but start-up, loss of communication and degraded operation are absent.

Implicit ownership

Two components assume the other detects, validates or recovers from the same fault.

Architecture after implementation

Documentation records what was built but no longer guides decisions or verification.

05 / DEEPER LEARNING

Allocate a behaviour across the whole system

Start with an observable outcome, such as preventing a chamber from exceeding an agreed temperature after a controller fault. Trace the physical chain: thermal coupling, sensor, analogue input, acquisition, decision, output driver, stored energy and heater. Allocate each responsibility and identify the observation that proves it happened. An output register reading zero is not proof that energy stopped flowing.

Distinguish a functional boundary from a containment boundary. A software module can make responsibilities clear without preventing another module from corrupting its memory. A separate MCU may still share the same power supply, oscillator, sensor or update image. Describe the actual mechanism that prevents one failure from defeating both control and protection.

Record assumptions alongside the allocation: maximum thermal rise, sensor response time, host availability and allowed restart conditions. Give each assumption an owner and a way to confirm it. An assumption that is never checked can quietly become a missing requirement.

06 / DEEPER LEARNING

Make budgets and trade-offs visible

A system budget divides a measurable limit between contributors. A response deadline may contain acquisition delay, filtering, transport, scheduling, decision and physical stopping time. Accuracy contains sensor, reference, conditioning, conversion and calibration effects. Keep margin explicit so a later change cannot spend the same allowance twice.

Budget against relevant operating conditions, including low supply, high temperature, maximum traffic and service activity. A design that works only with diagnostics disabled may have made observability incompatible with normal operation. Review the worst credible combination rather than adding unrelated maxima without a model.

Capture major choices in a short decision record: the problem, alternatives, evidence, choice, consequences and revisit trigger. This preserves why an independent cut-off was selected and what would have to change before it could be removed.

BoundaryContract to agreeEvidence
Sensor → controllerUnits, sample age, calibration identity and invalid-data rules.Recorded input and reported value under a known stimulus.
Host → controllerAcceptance, completion, cancellation and loss-of-link behaviour.A sequence including a lost acknowledgement.
Controller → actuatorPermitted states, command limits and confirmed physical response.Output and physical-effect measurements.
07 / DEEPER LEARNING

Review architecture through adverse scenarios

Walk a scenario with engineers from both sides of each interface. Ask who knows the current state after a reset, which data survives, and whether an old command can become valid again. Include manufacturing and service: a production fixture may enable outputs before the normal application runs.

Use the architecture to choose early experiments. If the main uncertainty is whether the actuator can stop within the hazard limit, test that physical path before refining the user interface. If the risk is a shared supply defeating two monitors, analyse and inject that fault. Update the architecture when observations contradict its assumptions; do not preserve an attractive diagram at the expense of the product model.

08 / APPLY THE LEARNING

Practical exercise

An illustrative engineering exercise; values are assumptions for this lesson.

Allocate a chamber over-temperature response

A chamber has an application computer, an MCU controlling a heater and a separate thermal cut-off. The host can freeze while the MCU continues its last command.

  1. Allocate normal temperature control, host-loss detection, over-temperature protection and restart authority.
  2. Specify what the MCU may do after host communication stops and what condition the cut-off must independently observe.
  3. Define two tests that distinguish an accepted command from a confirmed physical response.
Show the worked answer

One defensible allocation keeps time-critical control on the MCU, gives the host authority to request bounded targets, and uses a separate protection path for a hazardous over-temperature condition. The correct host-loss response follows from the chamber’s use: stop heating, finish a bounded safe step or maintain a justified local condition. It must not be an accidental consequence of retaining the last target.

The cut-off should respond to the relevant physical hazard through a path whose independence is justified, including sensing, power and output interruption. Specify whether restoration requires inspection or an authorised reset. Freeze the host during heating and observe heater energy and temperature. Then force the main output path into its credible failed condition and verify the independent protective response within its allocated limit.

Review criteria

  • Every safety-relevant action has an owner and an observable result.
  • Host loss and controller failure are treated as distinct scenarios.
  • Restart conditions and shared dependencies are explicit.
09 / SELF-REVIEW

Check your understanding

Does a second MCU prove independence?

No. Check shared sensing, power, clocks, software, communications and environmental exposure. Independence is a supported architectural property.

Why retain a decision record after testing?

Tests show behaviour in their conditions. The record preserves the assumptions and trade-offs that determine when those results remain applicable.

11 / REFERENCES

Further learning

KEY TAKEAWAY

Design the interactions, not only the components.

A credible embedded architecture makes behaviour, ownership, interfaces and failure responses explicit enough to guide implementation and objective enough to verify.