FreeRTOS
FreeRTOS is an open-source real-time operating system kernel for microcontrollers, providing task scheduling, synchronization, and timing services.
What is FreeRTOS?
FreeRTOS provides a kernel that manages the execution of multiple tasks. It ensures that the most critical tasks get CPU time exactly when needed through a priority-based preemptive scheduler, while keeping memory overhead minimal.
How We Use It
- Multi-Task Firmware: Separating complex applications into isolated, manageable tasks (e.g., UI, communication, sensor polling).
- Priority-Based Scheduling: Ensuring time-critical operations like motor control are not delayed by background tasks like network logging.
- Inter-Task Communication: Safely passing data between tasks using thread-safe mechanisms.
Technical Details
Our implementations utilize FreeRTOS primitives such as tasks, queues, semaphores, and mutexes to build safe concurrent firmware. We meticulously configure the RTOS tick rate and memory management schemes (like heap_4.c) to match the hardware's capabilities and the application's timing constraints. Software timers provide an efficient way to execute periodic functions without tying up a hardware timer.