Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
709 Views

Generate IRQ by Level

Hi all, 

 

I have the following configuration with the following problem. In Qsys i have a 1 bit Input (INPUTPIO) which should generate an Interrupt by Level. 

This is my C code: 

 

static void isr_signal(void *context) { alt_u8 *temp= (alt_u8 *) context; *temp= IORD_ALTERA_AVALON_PIO_DATA(INPUTPIO_BASE);} alt_ic_isr_register(INPUTPIO_IRQ_INTERRUPT_CONTROLLER_ID,INPUTPIO_IRQ,isr_signal,(void *)&adress, 0x0); IOWR_ALTERA_AVALON_PIO_IRQ_MASK(INPUTPIO_BASE, 0x1);  

 

With this code I get stuck and the Debugger goes into alt_irq_entry() alt_exception_entry and thats all. I am grateful for any help.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
47 Views

Your irq handler, I mean isr_signal(), must provide some mean of resetting the interrupt signal level, otherwise the irq would keep on retriggering. 

Then, your program would get stuck into isr_signal function as long as the PIO input is asserted. 

Moreover, check if 'adress' is a valid pointer.
Reply