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?
--- Quote Start --- Do I need to add some kind of interrupt ACK into my code/component? What is that standard way this is done? --- Quote End --- The "standard" way is probably with control register bits corresponding to interrupt enable, interrupt status, and interrupt pending. Then your irq output is just an "AND" of the three. The "ACK" would be a write to the interrupt pending bit to clear it. Since your first attempt was just a fixed duration assertion of the signal, you can probably get by with something much simpler like just asserting the irq until any read/write to the component is performed (e.g. clear the IRQ bit on the 'chipselect' input edge, if you have one).
Hello,I am looking for interfacing a custom component with Arm processor. I have very little knowledge of Altera software tools. The documents for interfacing custom component are too advanced and use template designs (rocketboards). Could you please share document or link for learning custom component interface and use in bare metal or Linux environment. Thank you.