Nios® V Processor Software Developer Handbook

ID 743810
Date 4/07/2025
Public

Visible to Intel only — GUID: thm1642823521609

Ixiasoft

Document Table of Contents

9.3.1.2. Writing a Platform ISR

The platform ISR you write must match the function prototype that alt_ic_isr_register() expects.
void (*alt_isr_func) (void* isr_context)

The parameter definition of isr_context is the same as for the alt_ic_isr_register() function.

From the point of view of the HAL exception handling system, the most important function of an ISR is to clear the associated peripheral’s interrupt condition. The procedure for clearing a platform interrupt condition is specific to the peripheral.

When the ISR has finished servicing the platform interrupt, it returns to the HAL interrupt funnel that called it.

Note: If you write your ISR in assembly language, use ret to return. The HAL general exception funnel issues an MRET after restoring the application context.