Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Generate IRQ by Level

Altera_Forum
Honored Contributor II
756 Views

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 II
94 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