From the course: Introduction to FreeRTOS and Basic Task Management
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
The task suspension and resumption functions
From the course: Introduction to FreeRTOS and Basic Task Management
The task suspension and resumption functions
- [Instructor] Let's examine the functions for suspending and resuming tasks, starting with a suspension function. Here is the prototype of the vTaskSuspend. This function suspends a task. Once a task is suspended, it won't be scheduled for execution by the free auto scheduler until it is explicitly resumed. The vTaskSuspend takes a single parameter. This is the X task to suspend. This is the handle of the task we want to suspend. If we pass NULL, the currently running task will be suspended, and this can be useful when we want a task to pause itself. Suspending a task is especially useful in scenarios where we need to conserve CPU time to prioritize other tasks, while the suspended task remains inactive. Let's move on to the task resumption. Over here, we use the vTaskResume. This function also has a single parameter, and this is the handle of the task we want to resume.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
The task creation and deletion functions1m 26s
-
(Locked)
Creating Task Profilers and Task Functions4m 38s
-
(Locked)
Creating tasks in FreeRTOS5m 16s
-
(Locked)
Controlling hardware from different tasks3m 56s
-
(Locked)
Passing parameters to tasks5m 56s
-
(Locked)
The task priority functions54s
-
(Locked)
Understanding preemption1m 54s
-
(Locked)
Experimenting with different task priorities4m 24s
-
(Locked)
Changing task priority at runtime3m 59s
-
(Locked)
Reading task priority3m 29s
-
(Locked)
The task suspension and resumption functions1m 1s
-
(Locked)
Suspending a task4m 18s
-
(Locked)
Resuming a suspended task6m 29s
-
(Locked)
Deleting a task in FreeRTOS4m 50s
-
(Locked)
-
-