The road to FreeRTOS learning, with STM32F103C8T6 as the experimental MCU (Chapter 1 - the basic framework of FreeRTOS)

 The way of learning is mainly the application of FreeRTOS operating system on STM32F103 (STM32F103C8T6), using the standard library programming method, and the IDE used is KEIL5.

Notice! ! ! This learning path can be learned by purchasing the STM32 minimum system board and some accessories, or by Proteus simulation.

Subsequent articles will be published on personal blog (jason1016.club) and CSDN at the same time;

The video will be posted on bilibili(UID:399951374)

I think RTOS is divided into the following six major frameworks according to type:

1. The task of RTOS

RTOS mainly divides the program to be executed into threads (TCB), then schedules the task stack of the thread through the scheduler, and finally uses the caller in the main function loop to realize the call execution of the task

2. Critical section protection of RTOS

RTOS uses this to define and protect a piece of code that cannot be interrupted during execution (the interrupt threshold is adjustable)

3. Idle tasks and blocking delays of RTOS

In RTOS, in order to make the delay operation not occupy CPU resources, when the task needs to be delayed, the right to use the CPU will be disconnected, and the CPU will be allowed to perform other tasks (if there are five other tasks, the RTOS will create an idle task for the CPU). This is the blocking delay.

4. Multiple priorities

Set the priority of the task process and sort the priority execution of the task; the smaller the numerical priority, the smaller the logical priority

5. Task delay list

Six, time slice

Corresponding to the above-mentioned multi-priority, the function is: there can be multiple tasks under the same priority, and each task enjoys the same CPU time in turn, and the CPU time enjoyed is called a time slice

Note: It’s not important if you don’t understand this chapter, because this chapter is just for everyone to have a basic understanding of FreeRTOS and build its preliminary cognitive system, because FreeRTOS mainly focuses on the application, so the follow-up will directly understand the theory from the application, and don’t think today’s article is so empty

This article is written independently by the author. All original articles on this BLOG may not be used for commercial purposes or traditional media without my permission. Please indicate the source for reprinting by online media, otherwise it is an infringement.

Guess you like

Origin blog.csdn.net/weixin_61908666/article/details/130841430