Interrupt Controller


OMAP L1xx Interrupt Controller -- Advanced Interrupt Controller Definitions And usage

Interrupt controller definitions

The file <cyg/hal/var_ints.h> (located at hal/arm/arm9/omap/VERSION/include/var_ints.h in the eCos source repository) contains interrupt vector number definitions for use with the eCos kernel and driver interrupt APIs.

The list of interrupt vectors may be augmented on a per-platform basis. Consult the platform HAL documentation for your platform for whether this is the case.

Interrupt Controller Functions

The source file src/omap_l1xx_misc.c within this package provides most of the support functions to manipulate the interrupt controller. The hal_IRQ_handler queries the IRQ status register to determine the interrupt cause. Functions hal_interrupt_mask and hal_interrupt_unmask enable or disable interrupts within the interrupt controller.

Interrupts are configured in the hal_interrupt_configure function. Only GPIO interrupts are configurable, and at present we do not support full decoding of these, so this function is empty.

The hal_interrupt_acknowledge function acknowledges an interrupt.

The hal_interrupt_set_level is used to set the priority level of the supplied interrupt within the Advanced Interrupt Controller. This is supported by assigning each vector to one of the 30 channels that map to the IRQ vector. The FIQ vector channels are currently ignored. The level value may range from 0 to 29, with 0 being the highest priority. This range is shifted into the 2..31 range, and any attempt to set a priority value greater than 29 is clamped to 29.

Note that in all the above, it is not recommended to call the described functions directly. Instead either the HAL macros (HAL_INTERRUPT_MASK et al) or preferably the kernel or driver APIs should be used to control interrupts.

Documentation license for this page: eCosPro License