Embedded Systems Notes

Embedded Systems Overview
  • Definition of a System:

    • An arrangement of units working together per a set of rules.

    • Example: Digital watch displaying time.

  • Definition of Embedded Systems:

    • Indicates something is attached to another thing.

    • A computer system with hardware and software that is either standalone or part of a larger system.

    • Generally microcontroller or microprocessor-based, battery operated.

    • Examples: Fire alarms, coffee dispensers, smart door locks.

Embedded Software Architecture
  • Real-Time Operating System (RTOS):

    • OS for embedded systems with strict execution time, memory, and performance constraints.

Components of Embedded Systems
  • Three Main Components:

    1. Hardware

    2. Embedded application software

    3. RTOS managing application software and ensuring scheduling for latency requirements.

  • Bare Metal Systems:

    • Systems without a traditional OS; software runs directly on hardware.

Characteristics of Embedded Systems
  1. Single-functioned: Performs specialized tasks consistently (e.g., pagers).

  2. Tightly constrained: Design metrics are stringent (cost, size, power). Must fit on one chip/board and process data quickly.

  3. Reactive and Real-time: Systems must respond immediately to environmental changes (e.g., car cruise control).

  4. Microprocessor-based: Relies on microcontrollers for software execution.

  5. Memory:

    • Software usually embedded in Flash/ROM.

    • Uses DRAM/SRAM for main memory without full virtual memory support.

    • No secondary storage (like HDD) to maintain reliability and low power.

    • Flash memory serves for storage.

  6. Connectivity:

    • Must interface with different peripherals, especially for IoT.

  7. HW-SW Combination:

    • Software enhances flexibility; hardware provides performance.

Features and Challenges of Embedded Systems
  • Features:

    • Customizable, low power consumption, low cost, high reliability, and real-time performance.

  • Challenges:

    • High development efforts, longer market time, larger volume requirements, and managing low power operations.

Computer Architecture and Embedded Systems
  • Definition: Computer architecture encompasses rules and methods that define how computer systems function and are organized.

    • Three Main Subcategories:

    1. Instruction Set Architecture (ISA)

    2. Microarchitecture

    3. Systems Design

  • Processor Architecture:

    • Details the design of processors, including multi-core designs and issues like cache coherency.

Software Development Process
  • Phases of Software Program Development:

    1. Edit: Source files (.c, .h)

    2. Preprocess: Compilation step incorporating include files.

    3. Compile: Conversion to object (.obj) files.

    4. Link: Link with libraries and object files.

    5. Load: Load executables into memory.

    6. Execute: Run program on CPU.

Memory and Storage Hierarchies
  • Principle of Locality: Programs reuse data and instructions based on proximity.

    • Temporal Locality: Recently accessed items are likely to be accessed again soon.

    • Spatial Locality: Adjacent items are accessed closely together.

  • Hierarchy of Memory Levels: Balances performance and cost, smaller, faster memories are more expensive.

  • Cache Coherency: Maintaining consistency of data across different levels of memory caches.

Types of Memory
  • Volatile Memory: Data lost when power is off (e.g., RAM).

  • Non-volatile Memory: Retains data when powered off (e.g., ROM, Flash).

  • Types of RAM:

    • Static RAM (SRAM): Faster, used for cache.

    • Dynamic RAM (DRAM): Slower, used for main memory and needs constant refreshing.

  • Types of ROM:

    • PROM, EPROM, EEPROM: Various forms of read-only memory with different characteristics.

Power States for Laptops
  • Sleep Mode: Retains current data in RAM, quicker to resume operation.

  • Hibernate Mode: Saves the memory content to the disk, longer to start but conserves power completely.


Summary Note: These notes cover the fundamentals of embedded systems, including their components, architecture, characteristics, software development phases, memory hierarchies, and aspects related to power management. Understanding these concepts is crucial for effectively working with embedded systems and microcontrollers.