This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help with interrupt on lpc2368

Hi!

Im using a lpc2368 I need some help setting up external interrupt. I get square waves on P2.13 and P1.31 and want to get interrupts on the raising edge on these ports. How do I this? Im guessing I need to install my interrupt handler with:

VIC_Install_IRQ(DWORD IntNumber, void* HandlerAddr, DWORD Priority)

What is the input parameters for that function?

lets assume that we got these handlers:

void MyEINTHandler0(void) __irq{ //do something...

VICVectAddr = 0; // ACK the VIC
}

and

void MyEINTHandler1(void) __irq{ //do something...

VICVectAddr = 0; // ACK the VIC
}

to install them just run

VIC_Install_IRQ(???,(void *)MyEINTHandler0,???);
VIC_Install_IRQ(???,(void *)MyEINTHandler1,???);

but what is IntNumber and priority? Where do I set which port and bit to trigger the interrupts? Any good examples to look at?

Best wishes.

Parents
  • I don't know what I'm doing wrong here, I set bit 13 in IO2IntEnR to get rising edge interrupts on P2.13 but I don't get any interrupts from p2.13. Is there anymore register I need to set to get it started? I can read from the port and see if I got an '1' or '0' so the port works.

    And I have installed my interrupt handler with the VIC_Install_IRQ functions as:

    VIC_Install_IRQ(EINT3_INT,(void *)EXT_EINT_isr,1);

    what else do I need to get this to work?

Reply
  • I don't know what I'm doing wrong here, I set bit 13 in IO2IntEnR to get rising edge interrupts on P2.13 but I don't get any interrupts from p2.13. Is there anymore register I need to set to get it started? I can read from the port and see if I got an '1' or '0' so the port works.

    And I have installed my interrupt handler with the VIC_Install_IRQ functions as:

    VIC_Install_IRQ(EINT3_INT,(void *)EXT_EINT_isr,1);

    what else do I need to get this to work?

Children