Nios II interrupt


I am new to the Nios II core. I have built a simple system with a timer which is set as periodically timer. I have registered an interrupt service routine:

alt_irq_disable(TIMER_0_IRQ); res = alt_irq_register(TIMER_0_IRQ, NULL, timer_isr);

With this code I still come in my installed ISR. So registering is also enable the interrupt. Is that correct, is there a way to register an ISR and leave the interrupt disabled (until you decide to enable it manually)?

Another question: where can I find a list with available routines for the peripheral. For instance, I saw in an example the call IOWR_ALTERA_AVALON_PIO_DATA to write to my io-pins. But where can I find a complete list. It not in the software developer's handbook.

best regards, Frank

Reply to
Frank van Eijkelenburg
Loading thread data ...

Normally, you'll use the generated alt_sys_init() to set up the timers in alt_main(). This wants to happen after the call to alt_irq_init(ALT_IRQ_BASE). Take a look at the macros in alt_sys_init() to see the underlying process.

Take a look in the components directory. For example, for pios, take a look at components/altera_avalon_pio/inc/altera_avalon_pio_regs.h.


Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.