38
CHAPTER 6
Interrupt handling API
6.8.5 OS_ARM_ISRSetPrio()
Description
Used to set or modify the priority of a specific interrupt source by programming the interrupt
controller.
Prototype
int
OS_ARM_ISRSetPrio (
int
ISRIndex,
int
Prio);
Parameters
Parameter
Description
ISRIndex
Index of the interrupt source which should be modified. Note that the
index counts from 0 for the first entry in the vector table.
Prio
The priority which should be set for the specific interrupt. Prio ranges
from 0 (highest priority) to 255 (lowest priority).
Additional information
This function sets the priority of an interrupt channel by programming the interrupt con-
troller. Please refer to CPU-specific manuals about allowed priority levels. Note that the
ISRIndex counts from 0 for the first entry in the vector table. The first peripheral index
therefore has the ISRIndex 16, because the first peripheral interrupt vector is located after
the 16 generic vectors in the vector table. This differs from index values used with CMSIS.
The priority value is independent of the chip-specific preemption levels. Any value between
0 and 255 can be used, were 255 always is the lowest priority and 0 is the highest priority.
The function can be called to set the priority for all interrupt sources, regardless of whether
embOS is used or not in the specified interrupt handler. Note that interrupt handlers run-
ning on priorities from 127 or higher must not call any embOS function.
embOS-MPU for Cortex-M and IAR
© 2010-2020 SEGGER Microcontroller GmbH