35
CHAPTER 6
Interrupt handling API
6.8.2 OS_ARM_InstallISRHandler()
Description
Installs an interrupt handler.
Prototype
void
OS_ARM_InstallISRHandler(
int
ISRIndex,
OS_ISR_HANDLER* pISRHandler);
Parameters
Parameter
Description
ISRIndex
Index of the interrupt source which should be installed.
Note that the index counts from 0 for the first entry in
the vector table.
pISRHandler
Address of the interrupt handler.
Additional information
Sets an interrupt handler in the RAM vector table. Does nothing when the vector table is
in Flash.
OS_ARM_InstallISRHandler()
copies the vector table from Flash to RAM when it
is called for the first time and RAM vector table is enabled.
Example
void
OS_InitHW(
void
) {
OS_ARM_ISRInit(
1u
,
82
, (OS_ISR_HANDLER**)__Vectors, (OS_ISR_HANDLER**)pRAMVectTable);
OS_ARM_InstallISRHandler(OS_ISR_ID_TICK, OS_Systick);
OS_ARM_ISRSetPrio(OS_ISR_ID_TICK,
0xE0u
);
OS_ARM_EnableISR(OS_ISR_ID_TICK);
}
embOS-MPU for Cortex-M and IAR
© 2010-2020 SEGGER Microcontroller GmbH