Forum Discussion
Altera_Forum
Honored Contributor
19 years agoNIOS program deadlocks
Hello folks, I have an interrupt-based NIOS II program and I'm using the DE2 board. My program works ok sometimes but it seems to deadlock randomly when pushbuttons are pressed or inputs fr...
Altera_Forum
Honored Contributor
19 years agoHello, I have a few recommendations.
1. Get your reset address out of volatile memory. - Point it at external flash, or at a pre-initialized "onchip" memory. 2. Get in and out of your ISRs as quickly as possible. - Do a minimal amount of processing to determine the cause of the interrupt. - Push any action off to the main loop of your code or a task (if using an OS). - Follow the example(s) in Count Binary and Board Diagnostics for ISR creation, etc. 3. Are you sure your processor is deadlocked? - It could be that you've set one of your input PIOs to generate level sensitive interrupts....and that level happens to be the default level of the input signal(s). - It could also be that you're (somehow) generating a spurious interrupt. (This would be tricky, unless you're manually enabling an interrupt that does not yet have a handler). Finally, it might help if you post some code illustrating where you suspect the problem(s) to be. Best Regards, - slacker