Forum Discussion
Altera_Forum
Honored Contributor
21 years agoIRQ handler problem
Hi all,
I have build an application on Stratix II, with three CPU's. I have ONE (!) pio line connected to the system of three CPU's. In the SOPC builder I connected the three CPU's to the PIO module. I enabled the IRQ on edge capture. All three CPU's are handling the interrupt. Now i'm experiencing problems. My system hangs sometimes in the alt_irq_register.c file in the while loop below. I think it is because all CPU's are handling the interrupt and using this method to reset the register:
IOWR_ALTERA_AVALON_PIO_EDGE_CAP(SYNC_CLOCK_BASE, 0x00); Can this be the problem? Does anyone have experienced the same problems before? I need to have the interrupts on all CPU's. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif The code in alt_irq_register.c (158)
do
{
if (active & mask)
{
alt_irq(alt_irq_arg, i);
break;
}
mask <<= 1;
i++;
} while (1);12 Replies
- Altera_Forum
Honored Contributor
Using 3 PIOs will enable you to turn off each signal in turn. However you need the logic to disable/clear the original interrupting hardware, plus once all 3 CPUs have handled the IRQ you need to re-enable all 3 of your PIOs. This could be done in software, but you'd be much better off desiging a bit of logic to solve the problem.
- Altera_Forum
Honored Contributor
Ok, I think i've misunderstood the original problem: i didn't think that i had to:
<div class='quotetop'>QUOTE </div> --- Quote Start --- disable/clear the original interrupting hardware[/b] --- Quote End --- but only to "edge-capture" an input signal, without having to clear some extern register. bye