Interrupt Controller


i.MXxx Interrupt Controller -- Advanced Interrupt Controller Definitions And Usage

Interrupt controller definitions

The file <cyg/hal/var_ints.h> (located at hal/arm/arm9/imx/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/imx_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. Since there is no action needed to acknowledge an interrupt, this function is empty.

The hal_interrupt_set_level is used to set the priority level of the supplied interrupt within the interrupt controller. The level value may range from 0 to 15, with 0 being the highest priority.

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