There is a practical guide to FreeRTOS Real-time kernel zou Changjun yisfx@126.com translation online.
Take a note here:
Chapter One: task management
(1.1) Overview
Each thread of execution is called a "task." Because the author prefers to use [tasks] rather than "threads," the threads have more specific meanings from previous experience.
(1.2) Task function
The task is a dead loop, you can't quit.
(1.3) Top level task status
A task can have one or two states. That is, the running state and the non-running state. The non-operational state can actually be divided into several sub states.
Task moved from non-running state to run state called "Switched in" or "swapped in"
A task is transferred from a running state to a non-running state called "switched out" or "swapped out"
The FreeRTOS Scheduler is the only entity that can make a task cut out.
(1.4) Create a task
Xtaskcreate parameter pcname: A descriptive task name. This parameter is not used by FreeRTOS. Just for auxiliary debugging. It is always easier to identify a readable name than to recognize it by using a handle.
(1.5) Task priority
The scheduler guarantees that the task with the highest priority is always selected and put into the running state in all the tasks that can be run. If there is more than one task on the selected priority, the scheduler will let these tasks take turns.
To be able to select the next running task, the scheduler needs to run itself at the end of each time slice.
The FreeRTOS real-time Kernel practical guide is a great way to get started, and as a beginner, I have to read a few more times and go through the examples.