FreeRTOS is an open source real-time operating system designed specifically for microcontrollers. It is small, fast and free.
This document is a Chinese translation of "Using the FreeRTOS Real Time Kernel: A Practical Guide" by Richard Barry, available via FreeRTOS.org. It introduces task management in small multitasking embedded systems.
It explains task functions, top-level task states, and task creation with xTaskCreate(), including parameters such as stack depth, priority, and task name length. This manual is written in Chinese.
| Task priority range | 0 to configMAX_PRIORITIES - 1 |
|---|---|
| Stack depth unit | words, not bytes |
| Task name maximum length | defined by config_MAX_TASK_NAME_LEN, including the null terminator |
In FreeRTOS, each execution thread is called a task.
It must return void and take a void pointer parameter.
No; tasks must not return in any way and must be deleted explicitly if no longer needed.
Tasks are created using the xTaskCreate() API function.