Forum Discussion
Altera_Forum
Honored Contributor
15 years agoInterrupt priority IIR
Hi all, I'm using the NIOSII with an Internal Interrupt Controller (IIR) and 8 IRQ's triggered by PIO edges. I assigned a number to each one of the IRQs which represents it's priority where a l...
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- As far as i know alt_irq_interruptible() needs to be called together with alt_irq_non_interruptible() to bracket the code right? --- Quote End --- Exactly! Maybe something like that
static void ISR_TIMER(void* context, int id)
{
int tempcontext;
// optional: Do something which is not interruptible
tempcontext= alt_irq_interruptible(id);
// Do something which is interruptible
alt_irq_non_interruptible(tempcontext);
}
If you call alt_irq_interruptible(id) with the IRQ-id of the ISR then only higher priority IRQs are able to interrupt. Greets