Forum Discussion
Altera_Forum
Honored Contributor
15 years agoIRQ not working
Hello i have a DE2-115, i am trying to generate an IRQ from a button press. I've mapped the button in the pin planner, connected to the system template instance generated by QSys and my software h...
Altera_Forum
Honored Contributor
15 years agoI've done volatile int legal declarating and i've changed my isr function to reset the register as shown below
static void handle_mutex_interrupts(void* context, alt_u32 id)
{
volatile int* edge_capture_ptr = (volatile int*) context;
/* Store the value in the Button's edge capture register in *context. */
*edge_capture_ptr = IORD_ALTERA_AVALON_PIO_EDGE_CAP(INPUT_IRQ_BASE);
// Reset the Buttons edge capture register.
IOWR_ALTERA_AVALON_PIO_EDGE_CAP(INPUT_IRQ_BASE, 0);
legal = 1;
} Still nothing.