MDK-ARM Keil, MDK-ARM Datasheet - Page 43

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
43
Task Lock and Unlock
In a real application, it is often necessary to ensure that a section of code runs as
a contiguous block, so that no interrupts occur while it is executing. In an RTX-
based application, this cannot be guaranteed, as the scheduler is continually
interrupting each task. To ensure a continuous execution, you must use the task
lock and task unlock system calls, which disable and re-enable the scheduler:
tsk_lock ();
do_critical_section ();
tsk_unlock ();
The critical section of code must be kept to a minimum, as a long period with the
scheduler disabled will disrupt the operation of the RTOS. The source code for
the tsk_lock() and tsk_unlock() functions on the OS_LOCK and OS_UNLOCK
macros are located in the
file and may be modified to meet any
RTX_Config.c
special requirements.
Configuration
So far, we have looked at the RTX API. This includes task management
functions, time management, and inter-task communication. Now that we have a
clear idea of exactly what the RTX kernel is capable of, we can take a more
detailed look at the configuration file. As mentioned at the beginning, you must
select the correct
for the microcontroller that you are using. All
RTX_Config.c
supported microcontrollers have a pre-configured configuration file, so RTX only
needs minimal configuration.
Like the other configuration files, the
file is a template file that
RTX_Config.c
presents all the necessary configurations as a set of menu options.

Related parts for MDK-ARM