ULINKPRO Keil, ULINKPRO Datasheet - Page 50

KIT DEBUG/TRACE UNIT HIGH SPEED

ULINKPRO

Manufacturer Part Number
ULINKPRO
Description
KIT DEBUG/TRACE UNIT HIGH SPEED
Manufacturer
Keil
Type
In-Circuit, Real-Time Debugger/Programmerr
Datasheets

Specifications of ULINKPRO

Contents
Module
For Use With/related Products
ARM7, ARM9, Cortex
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Getting Started: Creating Applications with µVision
Counting Semaphores (Multiplex)
Use a multiplex to limit the number of tasks that can access a critical section of
code. For example, a routine to access memory resources and that supports a
limited number of calls only.
os_sem mplxSema;
__task void job0 (void)
}
In this example, we initialize the multiplex semaphore with five tokens. Before a
task can call processBuffer(), it must acquire a semaphore token. Once the
function has completed, it returns the token to the semaphore. If more than five
calls attempt to invoke processBuffer(), the sixth must wait until one of the five
running tasks returns its token. Thus, the multiplex semaphore ensures that a
maximum of five calls can use processBuffer() simultaneously.
Interrupt Service Routines
An interrupt is an asynchronous signal from the hardware or software that forces
the microcontroller to save the execution state. Interrupts trigger a context
switch to an interrupt handler. Software interrupts are implemented as
instructions in the instruction set of the microcontroller and work similar to
hardware interrupts. Interrupts can be classified as a:
os_sem_init (mplxSema, 5);
while(1) {
}
Maskable interrupt (IRQ) – a hardware interrupt that can be ignored by
setting a bit in a bit-mask
Non-maskable interrupt (NMI) – a hardware interrupt that cannot be
configured and thus cannot be ignored
Software interrupt – generated within a processor by executing an instruction
os_sem_wait (mplxSema);
processBuffer();
os_sem_send (mplxSema);
{
// declare the semaphore
// init semaphore with 5 tokens
// acquire a token
// free the token
49

Related parts for ULINKPRO