embedded-rtos-lowpower

Installation
SKILL.md

Embedded RTOS Architecture, State Machines & Low-Power Design

Use this workflow to design deterministic, deadlock-free, and power-efficient embedded software architectures.

Workflow

  1. Choose the simplest concurrency model that meets timing requirements

    • Use a superloop + interrupt-driven FSM template when a single core runs a few periodic/event-driven tasks without complex networking stacks.
    • Use FreeRTOS when concurrent I/O stacks (Wi-Fi/BLE/LwIP/USB/GUI) require independent blocking flows and priority preemption.
  2. Architect RTOS tasks & inter-task communication safely

    • Read FreeRTOS Architecture Patterns before defining tasks, priorities, queues, or mutexes.
    • Prefer static allocation (xTaskCreateStatic, xQueueCreateStatic) or start from rtos_module_template.c to guarantee deterministic RAM budgets.
    • Assign one owner task per shared peripheral (gatekeeper pattern) instead of scattering mutexes across the codebase.
    • Use Direct-to-Task Notifications (xTaskNotifyFromISR) for lightweight ISR-to-task signaling instead of binary semaphores.
  3. Model complex control logic as an explicit Finite State Machine

    • Read FSM Architecture Guide to avoid tangled boolean flags (is_connected, is_retrying, is_error).
    • Guarantee explicit entry/exit actions, timeout transitions, and safe fallback/fault states.
Installs
–
First Seen
Today