Altera_Forum
Honored Contributor
9 years agopio interrupt not working
Hii ,
I'm new to the nios. i have a push button in my project which is connected to the pio ,which shouid generate interrupt whenever its get pressed. its falling edge irq. but interrupt is not getting generated. code is as bellow:# for initialization IOWR_ALTERA_AVALON_PIO_EDGE_CAP(START_STOP_KEY_BASE, 0x0); alt_ic_isr_register(START_STOP_KEY_IRQ_INTERRUPT_CONTROLLER_ID , START_STOP_KEY_IRQ, Status_chng, NULL, 0x0); # ISR inChL = IORD_ALTERA_AVALON_PIO_EDGE_CAP(START_STOP_KEY_BASE); IOWR_ALTERA_AVALON_PIO_EDGE_CAP(START_STOP_KEY_BASE, 0x0); IORD_ALTERA_AVALON_PIO_EDGE_CAP(START_STOP_KEY_BASE); edge cap read is always high . i tried enabling irq with hal function also but no result . controller is not going to isr at all. What m i missing here or if someone have some sample code of pio interrupt based on edge plz share... Thanks and regards Ankur