当前位置:网站首页>1299_ Task status and switching test in FreeRTOS
1299_ Task status and switching test in FreeRTOS
2022-07-28 08:52:00 【grey_ csdn】
All learning summary : GitHub - GreyZhang/g_FreeRTOS: learning notes about FreeRTOS.
About the definition of task status , There is a detailed description in this link :FreeRTOS task states and state transitions described

This is a state machine for state transition , You can see the conditions for switching between various states . It can be seen from the state machine , It is consistent with the information seen when the code analysis task was created , The default initial state of the task is ready The state of . Only ready The state of can be switched to running, Therefore, when scheduling implementation involves task activation, it is usually added to the ready task list .blocked The typical reason for the state is because OS Provided delay Interface , The processing of returning to the running state is still to enter ready state .
In order to test the execution of each state , I created 2 individual Task, One of the low priority ones is activated conditionally vTaskDelay Time delay 1000ms; A high priority delay at the end of each execution 500ms. At high priority task Constantly get the status of two tasks . Follow the previous introduction , It should be available until the high priority task is running , Low priority tasks can switch between different states .
The design code is as follows :


The above is a high priority task code design .

The above is the code design of low priority tasks .
The running effect of program compilation and burning :

It can be seen from the test results , This effect is consistent with the expectation .
边栏推荐
- 阿里巴巴内部面试资料
- 模型预测控制(MPC)解析(九):二次规划的数值解(下)
- 微服务架构 Sentinel 的服务限流及熔断
- Introduction to self drive tour of snow mountains in the West in January 2018
- Argocd Web UI loading is slow? A trick to teach you to solve
- Introduction of functions in C language (blood Book 20000 words!!!)
- 2022 Niuke multi school first problem solving Report
- C #, introductory tutorial -- debugging skills and logical error probe technology and source code when the program is running
- Pyspark changes the column order and saves it into iceberg database
- Opencv+paddle Orc recognize pictures and extract table information
猜你喜欢

Competition: diabetes genetic risk detection challenge (iFLYTEK)

Service current limiting and fusing of micro service architecture Sentinel

博客搭建九:hugo添加搜索功能
![[activity registration] User Group Xi'an - empowering enterprise growth with modern data architecture](/img/92/88be42faf0451cb19067672dab69c8.jpg)
[activity registration] User Group Xi'an - empowering enterprise growth with modern data architecture

Flink Window&Time 原理

Argocd Web UI loading is slow? A trick to teach you to solve

Basic syntax of jquey

阿里技术四面+交叉面+HR面,成功拿到offer,双非本科进不了大厂?

分布式系统架构理论与组件

图片批处理|必备小技能
随机推荐
PostgreSQL: cannot change the type of column used by a view or rule
1w5 words to introduce those technical solutions of distributed system in detail
竞赛:糖尿病遗传风险检测挑战赛(科大讯飞)
After reading these 12 interview questions, the new media operation post is yours
Recycling of classes loaded by classloader
机器学习如何做到疫情可视化——疫情数据分析与预测实战
网络安全漏洞分析与漏洞复现
Shell programming specifications and variables
Recruiting talents, gbase high-end talent recruitment in progress
Flink window & time principle
Kubernetes technology and Architecture (VII)
CAT1 4g+ Ethernet development board 232 data is sent to the server through 4G module TCP
A new method of exposing services in kubernetes clusters
Does gbase 8s support storing relational data and object-oriented data?
Slice function of JS handwriting function (thoroughly understand the header but not the footer)
JS inheritance method
classLoader加载的class的回收
为什么 ThreadLocal 可以做到线程隔离?
Top all major platforms, 22 versions of interview core knowledge analysis notes, strong on the list
思迈特软件完成C轮融资,让BI真正实现“普惠化”