Altera_Forum
Honored Contributor
9 years agoCustom component with interrupt
I'm working on a custom Qsys component. It does everything it's supposed to do, but it takes a long time (reading flash memory) so I need to make it non-blocking.
I added an interrupt sender to the component, and made it so that when the process is done it raises the IRQ line for 16 clock cycles. I assigned this interrupt sender a number (20) in Qsys and generated the system. I modified my driver so that it registers the interrupt on startup. The problem is that when I run the code, every time the process is done the debugger forces a break with NIOS2_BREAK() in alt_instruction_exception_entry. There is a rather long comment in that function, and near the bottom is says the following: * The problem could also be hardware related: * - If your hardware is broken and is generating spurious interrupts
* (a peripheral which negates its interrupt output before its
* interrupt handler has been executed will cause spurious interrupts) Do I need to add some kind of interrupt ACK into my code/component? What is that standard way this is done?