Altera_Forum
Honored Contributor
21 years agoNios stops responding to interrupts
Using Nios(3.2), Nios32@30mhz with some user logic modules in the C4. The simplest possible ISR will works a random number of times (< 30) and then stop working. The IRQ signal from the user logic is still low, but the ISR stops getting called just as if the IRQ is being masked in the Nios core. I have stripped down the ISR to just:
int main(void) { .... nr_installuserisr(na_myisr_irq, myISR, 0); count = 0; nr_setirqenable(1); .... } //ISR static int count; void myISR(int context) { printf("count %d\r", ++count); return; } This code should execute indefinitely, yet it locks after a random number of times. I have added sw delays in both the main routine and the ISR, but it does not fix the lockup. Using a push button or a signal generator as an interrupt source, I can see that the rate of interrupts makes no difference either. The non-deterministic nature of the problem suggests timing/floating input type behavior, yet the timing report says all constraints are met by wide margins. Altera support say they have verified the problem, and are are looking into the cause. If this really is a generic Nios problem, I can't be the first person to run into it. Anyone else see this?