Altera_Forum
Honored Contributor
14 years agoNIOS II Interrupt Registration
Hello,
My question is with regard to using NIOS II Interrupts on a Cyclone IV E board. The NIOS II was designed using the QSYS module within quartus and a VIC was added in order to allow for external hardware interrupts. I then register the interrupt in C-code using the enhanced API. The function then returns a success (0 on success) yet the program does not hand over functionality to the ISR. Here's my registration function: int check = alt_ic_isr_register(ENCODER_INPUT_A_IRQ_INTERRUPT_CONTROLLER_ID , // Encoder A ID from System.h
ENCODER_INPUT_A_IRQ, // Encoder A macro from System.h
nios_isr, // Programmer defined Interrupt service routine (seeabove)
base, // Optional, unused, only concerned about a single hardware interrupt
NULL); // Flag -- Reserved
and my ISR looks like this: void nios_isr(void* context) {
count++;
} Any suggestions? (Note: base is declared as null.)