MDK-ARM Keil, MDK-ARM Datasheet - Page 21

KIT REALVIEW MCU DEVELOPMENT

MDK-ARM

Manufacturer Part Number
MDK-ARM
Description
KIT REALVIEW MCU DEVELOPMENT
Manufacturer
Keil
Type
Compiler and IDEr
Datasheets

Specifications of MDK-ARM

For Use With/related Products
ARM MCUs
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Getting Started: Building Applications with RL-ARM
Each task has its own stack for saving its data during a context switch. The Task
Control Block is used by the kernel to manage the active tasks.
The Task Control Block contains information about the status of a task. Part of
this information is its run state. A task can be in one of four basic states,
RUNNING, READY, WAITING, or INACTIVE. In a given system only one
task can be running, that is, the CPU is executing its instructions while all the
other tasks are suspended in one of the other states. RTX has various methods of
inter-task communication: events, semaphores, and messages. Here, a task may
be suspended to wait to be signaled by another task before it resumes its READY
state, at which point it can be placed into RUNNING state by the RTX scheduler.
At any moment a single task may be running. Tasks may also be waiting on an
OS event. When this occurs, the tasks return to the READY state and are
scheduled by the kernel.
Starting RTX
To build a simple RTX-based program, we declare each task as a standard C
function and a TASK ID variable for each Task.
__task
__task
OS_TID
After reset, the microcontroller enters the application through the main()
function, where it executes any initializing C code before calling the first RTX
function to start the operating system running.
Task
RUNNING
READY
WAIT DELAY
WAIT INT
WAIT OR
WAIT AND
WAIT SEM
WAIT MUT
WAIT MBX
INACTIVE
void task1 (void);
void task2 (void);
tskID1,
Description
The currently running TASK
TASKS ready to run
TASKS halted with a time DELAY
TASKS scheduled to run periodically
TASKS waiting an event flag to be set
TASKS waiting for a group event flag to be set
TASKS waiting for a SEMAPHORE
TASKS waiting for a SEMAPHORE MUTEX
TASKS waiting for a MAILBOX MESSAGE
A TASK not started or detected
tskID2;
21

Related parts for MDK-ARM