freertos-synchronization
CommunityMaster FreeRTOS tasks: communicate, protect, perform.
Authorsynqing
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Building reliable real-time embedded systems with FreeRTOS requires careful management of inter-task communication and shared resources to avoid deadlocks and race conditions. This Skill provides comprehensive patterns and best practices for FreeRTOS task synchronization, enabling you to safely communicate between tasks, protect shared data, and meet critical real-time deadlines (like 120 FPS LED updates).
Core Features & Use Cases
- Queues for Communication: Safely send data between tasks with blocking or non-blocking operations.
- Semaphores for Signaling: Coordinate task execution by signaling events or resource availability.
- Mutexes for Resource Protection: Prevent race conditions by ensuring exclusive access to shared data.
- Use Case: Synchronize audio processing with LED animation, protect shared configuration data from concurrent access, or debug complex multi-tasking issues in your ESP32 FreeRTOS project.
Quick Start
Example: Basic queue usage for inter-task communication
#include "freertos/queue.h" typedef struct { uint32_t command; uint8_t data[64]; } CommandMessage; QueueHandle_t cmd_queue = xQueueCreate(10, sizeof(CommandMessage));
Producer task: xQueueSend(cmd_queue, &msg, pdMS_TO_TICKS(100));
Consumer task: xQueueReceive(cmd_queue, &msg, portMAX_DELAY);
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: freertos-synchronization Download link: https://github.com/synqing/K1.hardware/archive/main.zip#freertos-synchronization Please download this .zip file, extract it, and install it in the .claude/skills/ directory.