Course overview

How to Design Embedded Systems

49 modules
199 lessons
—
Part 1

Course Setup and the Incremental Ladder

  1. Course Setup and the Incremental LadderSign in

  2. Why "Bits to Devices"Sign in

  3. How to Use This CourseSign in

  4. The Incremental Ladder (Step 0 -> Step 7)Sign in

  5. The Course LensesSign in

  6. Diagram Legend and Notation TypesSign in

Part 2

What Is an Embedded System?

  1. What Is an Embedded System?Sign in

  2. Embedded vs General-Purpose Computing: constraints, failure costs, and correctnessSign in

  3. The triad: hardware, firmware, environmentSign in

  4. Range of systems: tiny MCUs to embedded Linux, and why the ladder still appliesSign in

Part 3

Digital Logic Basics

  1. Digital Logic BasicsSign in

  2. Logic Gates and Boolean ReasoningSign in

  3. Sequential Logic and StateSign in

  4. Timing as a ConstraintSign in

Part 4

From Datapaths to Simple CPUs

  1. From Datapaths to Simple CPUsSign in

  2. ALU, Registers, Control Unit: A Minimal CPU BoundarySign in

  3. Fetch-Decode-Execute: Instruction Execution as a Timing MachineSign in

  4. Minimal Instruction Sets: Expressiveness Under BoundariesSign in

Part 5

Microcontrollers vs Microprocessors vs SoCs

  1. Microcontrollers vs Microprocessors vs SoCsSign in

  2. What "Microcontroller" Implies: Integration as an Architectural CommitmentSign in

  3. Typical MCU Block Diagram: Where Bottlenecks HideSign in

  4. Choosing Under Constraints: Power, Cost, I/O, and Performance as Coupled AxesSign in

Part 6

Diagramming Embedded Architectures

  1. Diagramming Embedded ArchitecturesSign in

  2. System Block Diagrams: MCU, Power, Sensors, Actuators, and Failure DomainsSign in

  3. Timing Diagrams: Buses, Signals, and Control-Loop Timing as the Real SpecificationSign in

  4. Memory and Register Maps: Address Space as a Contract Between Silicon and FirmwareSign in

Part 7

Building Blocks of Control Logic

  1. Building Blocks of Control LogicSign in

  2. Decoders and Multiplexers: Selection and Routing as Control LogicSign in

  3. Synchronous Design and Clocking: Making Time a ContractSign in

  4. Hazards, Setup/Hold, and Metastability: When Timing Contracts BreakSign in

Part 8

Bus Interfaces and Simple On-Chip Interconnects

  1. Bus Interfaces and Simple On-Chip InterconnectsSign in

  2. Internal Buses - Shared Wires, Shared LatencySign in

  3. Address, Data, and Control Signals - How Buses Carry MeaningSign in

  4. Arbitration Intuition - Turning Contention into WaitingSign in

Part 9

Instruction Sets and Assembly Basics

  1. Instruction Sets and Assembly BasicsSign in

  2. Registers, Formats, Addressing Modes - The CPU Programming ContractSign in

  3. Load/Store IntuitionSign in

  4. Control Flow in AssemblySign in

Part 10

Firmware Toolchain and Build Process

  1. Firmware Toolchain and Build ProcessSign in

  2. From C to Machine CodeSign in

  3. Linker Scripts and Memory PlacementSign in

  4. Flashing and ProgrammingSign in

Part 11

Startup Code and Reset Sequences

  1. Startup Code and Reset SequencesSign in

  2. Reset Vector and Startup RoutinesSign in

  3. Stack and Heap SetupSign in

  4. Main Loop as Firmware TopSign in

Part 12

Debugging at the Bare-Metal Level

  1. Debugging at the Bare-Metal LevelSign in

  2. JTAG/SWD and Debug ProbesSign in

  3. Breakpoints, Watchpoints, and Memory InspectionSign in

  4. Logging Channels and Their Architectural CostsSign in

Part 13

Memory Types and Organization

  1. Memory Types and OrganizationSign in

  2. Flash, SRAM, EEPROM, External Memory: what each is good for and what it costsSign in

  3. Sections and Layout: code, data, stack, heap and why layout choices are correctness choicesSign in

  4. Addressing and Maps: reading memory maps as architectural documentationSign in

Part 14

Clocking and Timing Sources

  1. Clocking and Timing SourcesSign in

  2. Oscillators and Crystals: accuracy, drift, and why timekeeping affects protocols and controlSign in

  3. PLLs and Clock Trees (Conceptual): distributing time and creating new failure modes via skewSign in

  4. Performance vs Power: configuring clocks as a resource allocation decisionSign in

Part 15

Timers and Timekeeping

  1. Timers and TimekeepingSign in

  2. Timer Peripherals: compare/capture as the base of periodic behaviorSign in

  3. System Tick Timers: creating a time base for schedulingSign in

  4. Time as a Shared Dependency: what breaks when different subsystems assume different clocksSign in

Part 16

Latency, Jitter, and Real-Time Constraints

  1. Latency, Jitter, and Real-Time ConstraintsSign in

  2. Worst-Case vs Average Timing: designing for bounds rather than hopesSign in

  3. Interrupt latency and service time: why fast enough needs measurement and budgetingSign in

  4. Jitter impacts: control stability and communication reliability as downstream consequencesSign in

Part 17

Power and Energy Constraints

  1. Power and Energy ConstraintsSign in

  2. Sleep Modes and Power States: power as a state machine with wake-up costsSign in

  3. DVFS Concepts (High Level): trading speed for energy and what timing it destabilizesSign in

  4. Battery and Thermal Limits: designing around finite energy and heat dissipation budgetsSign in

Part 18

GPIO, Polling, and Basic Interfacing

  1. GPIO, Polling, and Basic InterfacingSign in

  2. Pin Configuration: input/output, pull-ups/pull-downs and electrical intentSign in

  3. Polling vs Interrupt-Driven I/O: choosing based on latency budgets and CPU availabilitySign in

  4. Debouncing and Basic Robustness: turning noisy physical signals into stable eventsSign in

Part 19

Interrupts and ISRs

  1. Interrupts and ISRsSign in

  2. Vectors and priorities: how the core chooses what happens nextSign in

  3. ISR safety: minimal work, bounded time, and predictable shared-state rulesSign in

  4. Shared data hazards: races, reentrancy, and patterns for correctness under preemptionSign in

Part 20

Serial Interfaces: UART, SPI, I²C

  1. Serial Interfaces: UART, SPI, I²CSign in

  2. UART framing and baud rates: timing agreements as protocol requirementsSign in

  3. SPI semantics: clock polarity/phase, full-duplex behavior, and chip-select realitiesSign in

  4. I2C semantics: addressing, start/stop, ACK/NACK and bus-level failure behaviorSign in

Part 21

Field Buses and Industrial Interfaces

  1. Field Buses and Industrial InterfacesSign in

  2. CAN/CAN-FD basics: arbitration, framing and why it fits safety-adjacent systemsSign in

  3. RS-485-style multi-drop: electrical and protocol implications of shared linesSign in

  4. Ecosystem view: automotive/industrial buses as layered stacks with tooling expectationsSign in

Part 22

Analog Interfaces: ADC and DAC

  1. Analog Interfaces: ADC and DACSign in

  2. Sampling and quantization: resolution, rates, and what you lose at the boundarySign in

  3. References, noise, filtering: designing measurement chains rather than reading "numbers"Sign in

  4. DACs and PWM outputs: producing controlled actuation signals and managing artifactsSign in

Part 23

Sensors, Actuators, and Simple Control Loops

  1. Sensors, Actuators, and Simple Control LoopsSign in

  2. Sensor interfacing patterns: temperature, pressure, IMU style devices and calibration realitiesSign in

  3. Actuation patterns: motors, relays, solenoids and safety constraints on outputsSign in

  4. Closed-loop vs open-loop: PID intuition and mapping control requirements to hardware limitsSign in

Part 24

Superloops and Cooperative Scheduling

  1. Superloops and Cooperative SchedulingSign in

  2. The superloop model: one main loop polling tasks and why it's still commonSign in

  3. Task decomposition: structuring work so deadlines are visibleSign in

  4. Pros and cons: predictability and simplicity versus starvation and latency cliffsSign in

Part 25

Periodic and Aperiodic Tasks

  1. Periodic and Aperiodic TasksSign in

  2. Sampling vs event-driven tasks: mapping work to time or interruptsSign in

  3. Rate monotonic intuition (high level): why shorter periods usually need higher prioritySign in

  4. Designing for determinism: budgeting, bounding, and measuring execution timeSign in

Part 26

Control Loops and Sampling Theory (High Level)

  1. Control Loops and Sampling Theory (High Level)Sign in

  2. Sampling rate and aliasing: what you must assume to trust measurementsSign in

  3. Proportional and PID controllers: stability intuition and tuning constraintsSign in

  4. Requirements to capabilities: matching loop rates and latency to MCU and peripheral realitiesSign in

Part 27

Scheduling with Interrupts and Timers

  1. Scheduling with Interrupts and TimersSign in

  2. Timer-driven periodic work: triggering loops and sampling at precise intervalsSign in

  3. Mixing polling and interrupts: composing mechanisms without losing predictabilitySign in

  4. Priority and preemption without an RTOS: failure modes and disciplined design rulesSign in

Part 28

Real-Time Design Patterns

  1. Real-Time Design PatternsSign in

  2. Deadline-based thinking: treating time as a correctness conditionSign in

  3. Watchdogs in control systems: coupling liveness detection to safety behaviorSign in

  4. Overruns and degraded modes: designing safe fallback behavior when deadlines are missedSign in

Part 29

RTOS Concepts and Primitives

  1. RTOS Concepts and PrimitivesSign in

  2. Tasks, Priorities, Ready Queues: what an RTOS schedules and whySign in

  3. Mutexes, Semaphores, Queues, Events: coordination primitives and their timing costsSign in

  4. Scheduling Policies: priority-based and round-robin behavior as predictable machinerySign in

Part 30

RTOS vs Bare-Metal: Choosing an Approach

  1. RTOS vs Bare-Metal: Choosing an ApproachSign in

  2. When a Superloop Is Enough: keeping complexity low while meeting deadlinesSign in

  3. When You Need an RTOS: integration, concurrency, and timing complexity thresholdsSign in

  4. Hybrid Patterns: RTOS for orchestration, bare-metal for tight timing regionsSign in

Part 31

Interrupt Handling in RTOS Systems

  1. Interrupt Handling in RTOS SystemsSign in

  2. ISR Design With RTOS APIs: what is safe to call and why restrictions existSign in

  3. Deferred Work: splitting ISR fast paths from worker-task slow pathsSign in

  4. Priority Inversion: how it happens and mitigation patternsSign in

Part 32

Memory Management and Isolation

  1. Memory Management and IsolationSign in

  2. Static vs Dynamic Allocation: determinism, fragmentation, and lifecycle correctnessSign in

  3. Heap Safety Under Real Time: when allocation becomes a timing hazardSign in

  4. MMU/MPU Concepts: isolation, fault containment, and where MCUs can enforce boundariesSign in

Part 33

Concurrency Hazards and Patterns

  1. Concurrency Hazards and PatternsSign in

  2. Races, Deadlocks, Inversions: failure modes in small systems with big consequencesSign in

  3. Minimal-Lock and Lock-Free Intuition: reducing shared state to reduce timing riskSign in

  4. Testing Concurrent Firmware: verification strategies under resource constraintsSign in

Part 34

Fault Models and Failure Modes

  1. Fault Models and Failure ModesSign in

  2. Hardware Faults: transient upsets, EMI/EMC issues and component wearSign in

  3. Software Faults: hangs, memory corruption, and logic bugs as safety eventsSign in

  4. Environmental Conditions: temperature, vibration, moisture and designing to specSign in

Part 35

Defensive Programming in Embedded Systems

  1. Defensive Programming in Embedded SystemsSign in

  2. Input Validation and Sanity Checks: treating sensor input as adversarial or wrongSign in

  3. Assertions vs Fail-Safe: choosing failure behavior that protects people and devicesSign in

  4. Degraded Modes: operating safely when parts of the system are unreliableSign in

Part 36

Watchdogs, Brown-Out, and Reset Strategies

  1. Watchdogs, Brown-Out, and Reset StrategiesSign in

  2. Watchdog Correctness: designing "petting" patterns that actually detect hangsSign in

  3. Brown-Out and Safe Reset: handling low power without corrupting stateSign in

  4. Boot-Time Self-Tests: startup diagnostics and safe bring-up behaviorSign in

Part 37

Redundancy, Diagnostics, and Health Monitoring

  1. Redundancy, Diagnostics, and Health MonitoringSign in

  2. Redundant Sensing and Actuation (High Level): N+1 and voting intuition and what it costsSign in

  3. BIST and Periodic Diagnostics: catching degradation before it becomes failureSign in

  4. Telemetry and Field Logging: error codes, logs, and fleet observability for devicesSign in

Part 38

Functional Safety and Certification Context

  1. Functional Safety and Certification ContextSign in

  2. Safety Integrity Ideas (Conceptual): what certification tries to bound and why process mattersSign in

  3. Fail-Safe vs Fail-Operational: architectural choices and their implications for redundancySign in

  4. Documentation and Traceability: linking requirements to tests as an engineering disciplineSign in

Part 39

Hardware–Software Partitioning

  1. Hardware–Software PartitioningSign in

  2. Partitioning Rules: what belongs in hardware, firmware, or external modules and whySign in

  3. Peripherals vs Bit-Banging: cost, timing, and reliability trade-offsSign in

  4. Designing for Total Cost: performance, BOM, power, and maintainability togetherSign in

Part 40

Board-Level Design Considerations

  1. Board-Level Design ConsiderationsSign in

  2. Power Delivery and Decoupling: stable power as a correctness prerequisiteSign in

  3. Clocking and Signal Integrity Basics: why board realities leak into firmware timingSign in

  4. Connectors and Protection: ESD, transient protection, and survivabilitySign in

Part 41

Bootloaders, Update Mechanisms, and Security

  1. Bootloaders, Update Mechanisms, and SecuritySign in

  2. Bootloader Responsibilities: startup, recovery, and update orchestrationSign in

  3. Fail-Safe Updates and Rollback: designing update flows that survive power lossSign in

  4. Secure Boot Intuition: signed firmware, trust roots, and limiting downgrade attacksSign in

Part 42

Manufacturing, Test, and Calibration

  1. Manufacturing, Test, and CalibrationSign in

  2. Design for Test: test points, fixtures, and factory modesSign in

  3. Factory programming and calibration: making accuracy and identity reproducibleSign in

  4. Provisioning and configuration: serial numbers, configuration, and key injection boundariesSign in

Part 43

System Integration and End-to-End Architecture

  1. System Integration and End-to-End ArchitectureSign in

  2. Device to Gateway to Cloud (Conceptual): boundaries and failure propagation across tiersSign in

  3. Fleet Diagnostics: remote telemetry, updates, and management responsibilitiesSign in

  4. Reference Architectures: sensor nodes, motor controllers, consumer devices and their dominant constraintsSign in

Part 44

Product Lifecycle and Maintenance

  1. Product Lifecycle and MaintenanceSign in

  2. Field Updates and Bug Fixes: operational discipline across long-lived hardwareSign in

  3. Hardware Revisions: compatibility, migration, and supporting multiple variantsSign in

  4. End-of-Life Planning: sunsetting devices without breaking dependent systemsSign in

Part 45

Embedded Design Patterns

  1. Embedded Design PatternsSign in

  2. State Machines and Event Loops: structuring behavior under timing constraintsSign in

  3. Driver and Command Abstractions: isolating peripheral details from application logicSign in

  4. HAL vs Direct Register Access: portability versus determinism and controlSign in

Part 46

Control, Sensing, and Actuation Patterns

  1. Control, Sensing, and Actuation PatternsSign in

  2. Sensor fusion (conceptual): combining noisy measurements and handling driftSign in

  3. Motor control patterns (basic): control structure without deep power electronicsSign in

  4. Safety interlocks: permissioning outputs and enforcing invariants on actuatorsSign in

Part 47

Test, Simulation, and Emulation

  1. Test, Simulation, and EmulationSign in

  2. Unit and integration testing for firmware: isolating logic without losing timing realismSign in

  3. Simulators and emulators: shifting discovery earlier and understanding what they cannot modelSign in

  4. Hardware-in-the-loop (conceptual): closing the loop with real signals and controlled environmentsSign in

Part 48

Design Checklists for New Embedded Devices

  1. Design Checklists for New Embedded DevicesSign in

  2. Requirements and constraints: timing, power, environment, safety as up-front architecture inputsSign in

  3. MCU and peripheral selection: I/O needs, memory budgets, and expansion plansSign in

  4. Firmware architecture and test plan: update strategy, diagnostic plan, and verification scopeSign in

Part 49

Appendices and Reference Materials

  1. Appendices and Reference MaterialsSign in

  2. Appendix A - Diagram templates by stepSign in

  3. Appendix B - Mapping to real-world platformsSign in

  4. Appendix C - Readiness checklists (ladder gates)Sign in

  5. Appendix D - Glossary (canonical terms)Sign in