Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Updated Mar 2025

vTaskStartScheduler

[RTOS Kernel Control]

task. h

1void vTaskStartScheduler( void );

Starts the RTOS scheduler. After calling the RTOS kernel has control over which tasks are executed and when.

The idle task and optionally the timer daemon task are created automatically when the RTOS scheduler is started.

vTaskStartScheduler()
will only return if there is insufficient RTOS heap available to create the idle or timer daemon tasks.

All the RTOS demo application projects contain examples of using

vTaskStartScheduler()
, normally in the
main()
function within main.c.

Example usage:

1void vAFunction( void )
2{
3 // Tasks can be created before or after starting the RTOS scheduler
4 xTaskCreate( vTaskCode,
5 "NAME",
6 STACK_SIZE,
7 NULL,
8 tskIDLE_PRIORITY,
9 NULL );
10
11 // Start the real time scheduler.
12 vTaskStartScheduler();
13
14 // Will not get here unless there is insufficient RAM.
15}