MDK-ARM Keil, MDK-ARM Datasheet - Page 28

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
28
Chapter 2. Developing With an RTOS
Inter-Task Communication
So far we have seen how application code can be written as independent tasks
and how we can access the timing services provided by RTX. In a real
application, we need to be able to communicate between tasks in order to make
an application useful. To enable this, a typical RTOS supports several different
communication objects, which can be used to link the tasks together to form a
meaningful program. RTX supports inter-task communication with events,
semaphores, mutexes, and mailboxes.
Events
When each task is first created, it has sixteen event flags. These are stored in the
Task Control Block. It is possible to halt the execution of a task until a particular
event flag or group of event flags are set by another task in the system.
Each task has 16 event flags. A
task may be placed into a waiting
state until a pattern of flags is set
by another task. When this
happens, it will return to the
READY state and wait to be
scheduled by the kernel.
The two event wait system calls
suspend execution of the task
and place it into the WAIT_EVNT state. By using the AND or OR version of the
event wait call, we can wait for a group of event flags to be set or until one flag
in a selected group is set. It is also possible to define a periodic timeout after
which the waiting task will move back to the READY state, so that it can resume
execution when selected by the scheduler. A value of
defines an infinite
0xFFFF
timeout period.
OS_RESULT os_evt_wait_and (unsigned short wait_flags,
unsigned short timeout);
OS_RESULT os_evt_wait_or (unsigned short wait_flags,
unsigned short timeout);

Related parts for MDK-ARM