Forum Discussion
Altera_Forum
Honored Contributor
13 years agoAdd these before alt_irq_register:
IOWR_ALTERA_AVALON_PIO_IRQ_MASK(button_IRQ, <irq_bit_mask>); // enable irq IOWR_ALTERA_AVALON_PIO_EDGE_CAP(button_IRQ, <irq_bit_mask>); // clear irq You also need to clear the edge capture bit in irq handler function, otherwise the irq will keep on retriggering. Also make sure of these points: - in qsys/sopc button pio must be defined with interrupt capability enabled - the button pio is correctly routed to fpga pin and pio is working: begin with polling the pio in while loop to test this point.