Embedded architecture defines how inputs, computation, memory, communication and outputs cooperate under product constraints. A useful architecture records data ownership, timing and failure behavior as well as block connections. This guide develops a sensor-processing path without assuming a particular board or operating system.
Reviewed 12 November 2026 · Worked examples with stated assumptions
On this page
Separate the physical and software views
- Input / sensor
- Acquisition
- Processing + memory
- Output / communication
- Supervision + recovery
The hardware view identifies sensors, interfaces, processor, memory and actuators. The software view identifies acquisition, processing, communication and supervision. A software task is not necessarily a separate hardware block, and one peripheral may serve several software operations.
Draw both views and connect them through explicit interface contracts.
Define a data contract at each boundary
A sample record might contain value, timestamp and status. State the units, valid range, update period and ownership. If an ISR produces records and a task consumes them, decide how the producer publishes a complete record and what happens when the queue is full.
A shared global variable does not solve those questions. If a reader can observe a new timestamp with an old value, the record is inconsistent even though each individual field looks reasonable.
Work a buffer-sizing example
A producer delivers one record each millisecond. If the consumer can be unavailable for 8 ms, eight arrivals may accumulate before accounting for boundary phase and existing occupancy. A ten-record buffer might be a candidate, but it is not proven sufficient until arrival bursts and service behavior are bounded.
Choose an overflow policy: reject new samples, replace old samples or enter a fault state. Record loss explicitly; silent overwrite can make later measurements appear valid when they are incomplete.
Where should timing be enforced?
Use a timer or peripheral trigger where sampling regularity matters. Keep expensive processing outside a time-critical interrupt when possible. A scheduler can dispatch work, but interrupt latency, blocking and resource contention remain part of the response-time budget.
For an illustrative 10 ms deadline, an acquisition and processing chain totaling 0.6 ms leaves 9.4 ms before those additional effects. Measure and bound the complete path, not just the fastest function call.
Design recovery alongside normal operation
Specify startup ordering, safe output values, communication timeouts and watchdog policy. Distinguish a sensor fault from a processor failure. A reset that repeatedly returns to the same bad state is not successful recovery.
Review architecture with a fault scenario for each boundary: missing input, delayed input, corrupt record, full buffer and interrupted update. Each should lead to a documented behavior that can be tested.
Common questions
Should every function be a separate RTOS task?
No. Split work where concurrency, timing or ownership justifies it. Excess tasks add stacks, coordination and scheduling costs.
Can a block diagram prove correctness?
No. It communicates structure; tests and analysis must verify the contracts, timing and failure behavior.
References and practice checks
The practice package includes original arithmetic models, a small RTL simulation and a host C exercise. Each states its test boundary; none is a silicon or board validation claim.