Forum Discussion
Altera_Forum
Honored Contributor
21 years agoWhy Nios II don't execute my ISR?
Hi All: I want implement a ISR in Nios II system, however, if I implement it with Nios HAL, everything is OK, the Isr call successfully, but if I implement it in alt_main(), without HAL, the inter...
Altera_Forum
Honored Contributor
21 years agoIf you write an application using the alt_main() rather than main() entry point then the HAL will not automatically perform any device initialisation for you. This includes initialisation of the interrupt controller. Take a look in alt_main.c that comes with the kit. This contains the code that would have run if you'd used the main() entry point instead.
The line that is of interest to you is the one that initialises the interrupt controller: alt_irq_init (ALT_IRQ_BASE); If you add that to the top of your alt_main(), that should do the job.