I have just learn ARM7 LPC2148 and I have some problem about VIC when it assigned to IRQ_vector.My problem means, how can I use more than one IRQ interrupt (IRQ vector) at the same time . and the code for it. Some friend tell me After I allow Interrupt sources which I want ,I can assign each ISR_routine functions to VICvectorAddr0,VICvectorAddr1,…etc(example VICvectorAddr0=unsigned(ISR_routine function1) VICvectorAddr1=unsigned(ISR_routine function2)
) but I don’t know how Arm can recognise which ISR_routine function service for which Vector IRQ interrupt-sources.
I have just learn ARM7 LPC2148 and I have some problem about VIC when it assigned to IRQ_vector.My problem means, how can I use more than one IRQ interrupt (IRQ vector) at the same time . and the code for it. Some friend tell me After I allow Interrupt sources which I want ,I can assign each ISR_routine functions to VICvectorAddr0,VICvectorAddr1,…etc(example VICvectorAddr0=unsigned(ISR_routine function1) VICvectorAddr1=unsigned(ISR_routine function2)
) but I don’t know how Arm can recognise which ISR_routine function service for which Vector IRQ interrupt-sources.
The VICVectAddr register at 0xFFFF F030 will contain the address of the handler for the current interrupt. Your primary IRQ ISR needs to read it and then jump to that address for the ISR responsible for that particular interrupt source.
at location 0x18, it will jump on the right interrupt handler. Note that your interrupt handler should also implement the workaround for spurious interrupts, it is described on the LPC2148 data sheet.
You may just take the code from the LPC2148 demo from the link in my signature (files crt0.s and chcore2.s into ./demos/ARM7-LPC214x-GCC).