Forum Discussion
Altera_Forum
Honored Contributor
13 years agohaving trouble with interrupt
Hello everyone , I'm try for a very long time to do a simple interrupt with nios ii. this is my problem: i have button in sratix ii dev kit and all i want to do in nios is just to turn on ...
Altera_Forum
Honored Contributor
13 years agoIOWR_ALTERA_AVALON_PIO_IRQ_MASK(button_base_address,1); // enable irq
IOWR_ALTERA_AVALON_PIO_EDGE_CAP(button_base_address, 1); // clear irq Infact you are using PIO bit 0, then mask = 1. For clarity: if you had a 8 bit wide PIO and you connected the button to pio_input[6], then you'd had irq_bit_mask=0x40 IRQ line nr is involved only in alt_irq_register() call.