--- Quote Start ---
Can it be that the interrupt is already requested by the hardware when you register it?
When do you enable it?
Does your interrupt service function clears the interrupt request properly after processing it?
I assume the moment you register the ISR its executed and never returns or its executed over and over again because the request is not cleared.
Another problem i had was some trouble with the alt_irq_handler.c and alt_instruction_exception_entry.c.
The Altera default functions end in an endless loop if you have "glitches" on your IRQ signals. This was with NIOS 9.1.
To fix this is use modified functions.
--- Quote End ---
This is my IRQ handler:
# ifdef ALT_ENHANCED_INTERRUPT_API_PRESENT
static void A2D_ISR(void *context)
# else
static void A2D_ISR(void *context, u32 id)
# endif
{
IOWR_ALTERA_AVALON_PIO_IRQ_MASK(BUSY_BASE,0xf);
IOWR_ALTERA_AVALON_PIO_EDGE_CAP(BUSY_BASE,0);
a2d_fl_conversion_finished = A2D_CONV_FINISHED;
}