MDK-ARM Keil, MDK-ARM Datasheet - Page 48

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
48
However, the low priority task T3 could be pre-empted by a medium priority task
T2. Now, T2 is free to run until it blocks (assuming it does) before allowing T3
to resume completing its operation and allowing T1 to resume execution. The
upshot is the high priority task T1 that is blocked and that becomes dependent on
T2 to complete before it can resume execution.
os_tsk_prio (tsk3, 10);
os_evt_set (0x0001, tsk3);
os_evt_wait_or (0x0001, 0xffff);
os_tsk_prio (tsk3, 1);
The answer to this problem is priority elevation. Before T1 calls T3 it must raise
the priority of T3 to its level. Once T3 has completed, its priority can be lowered
back to its initial state.
Exercise: Priority Inversion
This exercise demonstrates a priority inversion and priority elevation.
// raise the priority of task3
// trigger it to run
// wait for Task3 to complete
// lower its priority
Chapter 2. Developing With an RTOS

Related parts for MDK-ARM