Been studying the user manuals and things don’t seem to be laid out as plainly as I would hope, or maybe everything is right in front of me and I’m just not seeing it. Anyway, this is my understanding of LPC2000 interrupts and the VIC. Please comment and/or correct.
The ARM core still just has the two HW interrupts, FIQ and IRQ, with vectors to those interrupts living in low memory (skipping over any memory remapping for now). But all the LPC2000 interrupt sources can only reach one of the two ARM interrupt routines via the VIC. Any interrupt source can be mapped in the VIC as an FIQ, a vectored IRQ or a non-vectored IRQ.
On an interrupt the VIC passes the interrupt request to the ARM core as either a FIQ or IRQ, depending on how that interrupt was configured. At the same time, for IRQs, it makes the previously-supplied address of the interrupt handler available via VICVectAddr. It is up to the IRQ routine to read this address and branch to the handler code. After the handler code is finished, I suppose it can either do the interrupt return itself or return to the IRQ code which does the interrupt return.
Lastly, my understanding is that I can set up my FIQ and IRQ handlers either in asm or in C (gcc) using e.g.
void f () attribute ((interrupt (“IRQ”)));
I’ll stop here and wait for some feedback. Many thanks for any comments.
Mike