FreeRTOS Lecture 25 – Exercise: Introduction

 

 Exercise: Introduction

 

 

Now let’s do one exercise, and by doing this exercise, you can understand more about the task creation and how things work in the FreeRTOS, and later we can also analyze this exercise by using the segger system view software.

Exercise:

Write a program to create two tasks, Task 1 and Task 2, with the same task priorities. When Task 1 executes, it should print “Hello World from Task-1,” and when Task 2 executes, it should print “Hello World from Task-2”.

There are two cases for this exercise:

Case 1: Use semi-hosting to print logs on the console. Log means some text like hello world or whatever. When the task wants to print, you can use semi-hosting to print those logs.

Case 2: Case 2 prints logs via the UART peripheral of the microcontroller. In this project, you will understand how to use the UART peripheral. 

There is one more setting you have to do. Use a system clock of the microcontroller as 16MHz. So, we will run the microcontroller by using the internal high speed RC oscillator of 16MHz. Before doing this exercise, let’s do some microcontroller-specific clock settings.  

 

FastBit Embedded Brain Academy Courses

click here: https://fastbitlab.com/course1

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.