当前位置:网站首页>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 .
边栏推荐
- Deployment of kubernetes
- Pyspark changes the column order and saves it into iceberg database
- Slice function of JS handwriting function (thoroughly understand the header but not the footer)
- 博客搭建九:hugo添加搜索功能
- 中标捷报!南大通用GBase 8s中标南瑞集团2022年数据库框架项目
- 快速搭建一个网关服务,动态路由、鉴权的流程,看完秒会(含流程图)
- HCIP第八天
- Half bridge buck circuit - record
- 模型预测控制(MPC)解析(九):二次规划的数值解(下)
- View the dimensions of the list
猜你喜欢

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

Half bridge buck circuit - record

我来教你如何组装一个注册中心?

图片批处理|必备小技能

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

网络安全漏洞分析与漏洞复现

说透缓存一致性与内存屏障

49 opencv deep analysis profile

Line generation (matrix)

Quickly build a gateway service, dynamic routing and authentication process, and watch the second meeting (including the flow chart)
随机推荐
Does gbase 8s support storing relational data and object-oriented data?
Digital signatures and Ca certificates
How CI framework integrates Smarty templates
Export SQL server query results to excel table
谷歌 Material Design 的文本框为什么没人用?
PHP基础知识 - PHP 使用 MySQLI
Can‘t connect to server on ‘IP‘ (60)
Chapter 2-2 calculation of piecewise function [1]
解决:IndexError: index 13 is out of bounds for dimension 0 with size 13
'global event bus' &' message subscription and Publishing '
You're not still using xshell, are you? This open source terminal tool is yyds!
置顶各大平台,22版面试核心知识解析笔记,强势上榜
GBase 8a MPP与银河麒麟(x86版)完成深度适配
Three different numbers with 0 in leetcode/ array
How to configure phpunit under window
When will brain like intelligence, which is popular in academia, land? Let's listen to what the industry masters say - qubits, colliders, x-knowledge Technology
Round C financing has been completed! Smart software leads domestic Bi ecological empowerment, and products and services are a step forward
Eight ways to solve EMC and EMI conducted interference
机器学习如何做到疫情可视化——疫情数据分析与预测实战
Deployment of kubernetes