Amruta (talk) 13:44, 8 April 2015 (IST)
Intro
This is our first tutorial with FreeRTOS so start with a simple example of how to create and use a task.
Before going to this tutorial its recommended to first go through the FreeRTOS basics tutorial.
- In main function we will create 3 tasks viz., MyTask1, MyTask2 and MyTask3 with priorities 1,2 and 3 respectively.
- An idle task is also created, which will be run when there are no tasks in RUN state.
- Only creating task is not sufficient. Tasks will be executed once the scheduler is started.
- So call vTaskStartScheduler() to start the scheduler.
Code
For making it easier to understand what is happening, we are displaying some data on UART.
You can find the function prototypes and details here.