Task Management
Task Stack
(RAM) (4)
Priority
(2)
Task Code
(1)
CPU_STK MyTaskStk[???]
void
MyTask (void *p_arg)
{
/* Local variables */
/* Task Initialization */
for (;;) {
Wait for event to occur;
Process event;
}
}
Variables
CPU
(RAM)
(5)
I/O
Registers
(3)
(Optional)
Device(s)
(6)
(Optional)
Figure 5-2 Tasks interact with resources
F5-2(1)
An important aspect of a task is its code. As previously mentioned, the code
looks like any other C function, except that it is typically implemented as an
infinite loop. Also, a task is not allowed to return.
F5-2(2)
Each task is assigned a priority based on its importance in the application.
μC/OS-III’s job is to decide which task will run on the CPU. The general rule is
that μC/OS-III will run the most important ready-to-run task (highest priority).
With μC/OS-III, a low priority number indicates a high priority. In other words,
a task at priority 1 is more important than a task at priority 10.
μC/OS-III supports a compile-time user configurable number of different
priorities (see OS_PRIO_MAX in OS_CFG.H ). Thus, μC/OS-III allows the user to
determine the number of different priority levels the application is allowed to
use. Also, μC/OS-III supports an unlimited number of tasks at the same priority.
For example, μC/OS-III can be configured to have 64 different priority levels
and one can assign dozens of tasks at each priority level.
See section 5-1 “Assigning Task Priorities” on page 84.
81
相关PDF资料
AD-UCUSBD-SPRD PRD LIC UCUSB DEV CORE CCES SGL
AD637-EVALZ BOARD EVALUATION FOR AD637
AD736-EVALZ BOARD EVALUATION FOR AD736
AD737-EVALZ BOARD EVALUATION FOR AD737
AD8007AKS-EBZ BOARD EVAL FOR AD8007AKS
AD8018ARU-EVAL BOARD EVAL FOR AD8018
AD8034ART-EBZ BOARD EVAL FOR AD8034ART
AD8040AR-EBZ BOARD EVAL FOR AD8040AR
相关代理商/技术参数
ADUCOSC100 制造商:Analog Devices 功能描述:ADC - Rail/Tube
ADUCOSC100-REEL 功能描述:DAC MICROCONVERTER DUAL TSSOP 制造商:analog devices inc. 系列:* 零件状态:上次购买时间 标准包装:1
ADUCOSC100-REEL7 功能描述:DAC MICROCONVERTER DUAL TSSOP 制造商:analog devices inc. 系列:* 零件状态:上次购买时间 标准包装:1
ADUCOSCZ100 制造商:Analog Devices 功能描述:
ADUCOSCZ100-REEL7 制造商:Analog Devices 功能描述:ANAADUCOSCZ100-REEL7 12 BIT ADC WITH EMB
ADuC-P7026 功能描述:开发板和工具包 - ARM PROTOTYPE BRD FOR ADUC7026 ARM7 RoHS:否 制造商:Arduino 产品:Development Boards 工具用于评估:ATSAM3X8EA-AU 核心:ARM Cortex M3 接口类型:DAC, ICSP, JTAG, UART, USB 工作电源电压:3.3 V
ADUCRF101 制造商:Analog Devices 功能描述:PRECISION ANALOG MICRCONTROLLER - Tape and Reel
ADUCRF101BCPZ128 制造商:Analog Devices 功能描述:PRECISION ANALOG MICROCONTROLLER WITH RF TRANSCEIVER, ARM CO - Trays