MDK-ARM Keil, MDK-ARM Datasheet - Page 25

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
25
Time Delay
The most basic of these timing services is a simple timer delay function. This is
an easy way of providing timing delays within your application. Although the
RTX kernel size is quoted as 5K bytes, features such as delay loops and simple
scheduling loops are often part of a non-RTOS application and would consume
code bytes anyway, so the overhead of the RTOS can be less than it initially
appears.
void os_dly_wait (unsigned short delay_time)
This call will place the calling task into the WAIT_DELAY state for the
specified number of system timer ticks. The scheduler will pass execution to the
next task in the READY state.
During their lifetime, tasks move
through many states. Here, a
running task is blocked by an
os_dly_wait() call so it enters a
WAIT state. When the delay
expires, it moves to the READY
state. The scheduler will place it
in the RUN state. If its time slice
expires, it will move back to the
READY state.
When the timer expires, the task will leave the WAIT_DELAY state and move to
the READY state. The task will resume running when the scheduler moves it to
the RUNNING state. If the task then continues executing without any further
blocking OS calls, it will be de-scheduled at the end of its time slice and be
placed in the READY state, assuming another task of the same priority is ready
to run.
Exercise: Time Management
This exercise replaces the user delay loops with the OS delay function.

Related parts for MDK-ARM