ULINKPRO Keil, ULINKPRO Datasheet - Page 44

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
RTX Introduction
Many microcontroller applications require simultaneous execution of multiple
jobs or tasks. For such applications, an RTOS allows flexible scheduling of
system resources (CPU, memory, etc.) to several tasks.
With RTX, you write and compile programs using standard C. Only a few
deviations from standard C are required in order to specify the task ID and
priority. RTX-166 programs require the inclusion of the RTX166.H or
RTX166T.H header file also. RTX_CONFIG.C is required on ARM devices.
By selecting the operating system through the dialog Options for Target –
Target, the linker, L166, included in µVision, links the appropriate RTX-166
library file.
Single Task Program
A standard C program starts execution with the main function. In an embedded
application, the main function is usually coded as an endless loop and can be
thought of as a single task that is executed continuously. For example:
int counter;
main (void)
}
Round-Robin Task Switching
Round-Robin task switching allows a quasi-parallel, simultaneous execution of
several tasks. Each task is executed for a predefined period. A timeout suspends
the execution of a task and causes another task to be started. The following
example uses this round-robin task switching technique.
Program execution starts with job0, as an RTOS task function. The RTX
function os_tsk_create marks job1 as ready for execution. The task functions
job0 and job1 are simple counting loops. After its time slot has been consumed,
RTX suspends the execution of job0 and begins execution of job1. As soon as
its time slot is consumed, the system continues with job0.
counter = 0;
while (1)
}
counter++;
{
{
// repeat forever
// increment counter
43

Related parts for ULINKPRO