Ground Embedded KO Subscribe

Roadmap / Foundations

Data Structures & Algorithms

An MCU has only tens of kilobytes of RAM. How you store data decides how stable the system is.

Goal Choose structures that handle data within limited memory and time.

  1. 01
    Time and memory complexity

    Why computation and memory use come first on a small MCU.

    Read the note KR

  2. 02
    Ring buffer

    A circular queue that keeps incoming UART data safe: the bridge between an interrupt and the main loop.

    Read the note KR

  3. 03
    Queues and stacks

    What a work queue and a call stack really are, implemented with arrays.

    Read the note KR

  4. 04
    Linked lists and memory pools

    Using lists with a pre-allocated pool instead of dynamic allocation.

    Read the note KR

  5. 05
    State machines

    Organising complex sequences as states and transitions. The basic tool of firmware design.

    Read the note KR

  6. 06
    Search and lookup tables

    Binary search, and precomputed tables for functions such as sine.

    Read the note KR

  7. 07
    CRC and checksums

    Writing the calculation that tells you whether data was corrupted in transit.

    Read the note KR

  8. 08
    Fixed-point arithmetic

    Q formats: handling fractions with integers on an MCU without an FPU.

    Read the note KR