Hi, 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
Nios II interrupt
Started by ●October 5, 2006
Reply by ●October 5, 20062006-10-05
Frank van Eijkelenburg wrote:> Hi, > > 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)?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.> > 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.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. Mark