MDK-ARM Keil, MDK-ARM Datasheet - Page 34
MDK-ARM
Manufacturer Part Number
MDK-ARM
Description
KIT REALVIEW MCU DEVELOPMENT
Manufacturer
Keil
Type
Compiler and IDEr
Specifications of MDK-ARM
For Use With/related Products
ARM MCUs
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
- Current page: 34 of 156
- Download datasheet (3Mb)
34
Using Semaphores
Although semaphores have a simple set of OS calls, they have a wide range of
synchronizing applications. This makes them perhaps the most challenging
RTOS objects to understand. In this section, we will look at the most common
uses of semaphores. Some are taken from “The Little Book Of Semaphores” by
Allen B. Downy, and may be freely downloaded from the URL given in the
bibliography at the end of this book.
Signaling
Synchronizing the execution of two tasks is the simplest use of a semaphore:
In this case, the semaphore is used to ensure that the code in FuncA() is executed
before the code in FuncB().
Multiplex
A multiplex semaphore limits the number of tasks that can access a critical
section of code. For example, routines that access memory resources and can
support a limited number of calls.
os_sem Multiplex;
void task1 (void) __task
}
os_sem semB;
__task void task1 (void)
}
os_sem_init (Multiplex, 5);
while (1)
}
os_sem_init (semB, 0);
while (1)
}
os_sem_wait (Multiplex, 0xFFFF);
ProcessBuffer ();
os_sem_send (Multiplex);
os_sem_send (semB);
FuncA();
{
{
{
{
__task void task2 (void)
}
while (1)
}
os_sem_wait (semB, 0xFFFF);
FuncB();
Chapter 2. Developing With an RTOS
{
{
Related parts for MDK-ARM
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
KIT REALVIEW MCU DEVELOPMENT
Manufacturer:
Keil
Datasheet:
Part Number:
Description:
Development Software SUPPORT EXTENSION FOR MDK-ARM-B
Manufacturer:
Keil Software
Part Number:
Description:
Development Software SUPPORT EXTENSION FOR MDK-ARM
Manufacturer:
Keil Software
Part Number:
Description:
KIT REALVIEW MCU DEVELOPMENT
Manufacturer:
Keil
Datasheet:
Part Number:
Description:
Development Software MCU DEV KIT FOR ARM UPG TO FLOATING LIC
Manufacturer:
Keil Tools
Part Number:
Description:
Development Software MCU DEV KIT FOR ARM W/ FLOATING LICENSE
Manufacturer:
Keil Software
Part Number:
Description:
Development Software MCU DEV KIT FOR ARM uVISION & C++ & RTX
Manufacturer:
Keil Tools
Part Number:
Description:
Development Software SUPP LICENSE RENEWAL 90+ DAYS NO TECH SUP
Manufacturer:
Keil Software
Part Number:
Description:
KEIL C-COMPILER INTERNATIONAL
Manufacturer:
Silicon Laboratories Inc
Part Number:
Description:
BOARD EVAL FOR LPC213X ARM MCU
Manufacturer:
NXP Semiconductors
Datasheet:
Part Number:
Description:
K60N512 Keil Tower Kit
Manufacturer:
Freescale Semiconductor
Datasheet: