Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

8.2.4.1. Methods the HAL Uses to Register the ISR

The HAL registers the ISR by one of the following methods:
  • For the IIC, by the storing the function pointer, isr, in a lookup table.
  • For an EIC, by configuring the vector table with the appropriate funnel code

    For more information, refer to the “Using Interrupt Funnels” chapter.

The return code from alt_ic_isr_register() is zero if the function succeeded, and nonzero if it failed.

If the HAL registers your ISR successfully, the associated Nios II hardware interrupt (as defined by irq) is enabled on return from alt_ic_isr_register().

Note: Hardware-specific initialization might also be required.

When a specific interrupt occurs, the HAL code ensures that the registered ISR is correctly dispatched.

For more information and details about hardware interrupt initialization specific to your peripheral, refer to the relevant chapter of the Embedded Peripherals IP User Guide.

For more information about alt_ic_isr_register(), refer to the "HAL API Reference" chapter.

Note: The HAL legacy interrupt API provides a different function for registering hardware interrupts. For all new and updated drivers, Intel FPGA recommends using the enhanced API described in this section.

For more information about the legacy API function, alt_irq_register(), refer to the "HAL API Reference" chapter.