Hello Mohan,
Check out the errata for the lpc2138. The lpc2xxx chips have some issues
with the EXTMODE and EXTPOLAR registers. Don't know if this affects your
code, because I don't have the rest of your code. Also the "VICVectCntl4
= (0 << 5)| VIC_EINT3;" does not need to be in the ExtInterrupt routine.
RD.
Mohan K wrote:
> Hi all,
> I am trying to the external interrupt 3 of lpc2138 to invoke
> the trackball routine. But the controller is not responding. The
> following is the code i am using.
>
> static void __attribute__ ((interrupt("IRQ"))) ExtInterrupt(void)
> {
> VICVectCntl4 = (0 << 5)| VIC_EINT3;
> //PCON=0x00;
> //PCONP = 0x001817BE;
> time=0;
> init_trackball();
> EXTINT=0x08;
> VICVectAddr = 0x00000000;
> }
> void enableEXTinterrupt(void)
> {
> PINSEL1 |= 0x20000000;
> //INTWAKE = 0x0008;
> EXTMODE = 0x08;
> EXTPOLAR = 0x00;
> VICVectAddr4 =(unsigned int)ExtInterrupt;
> VICVectCntl4 = VIC_ENABLE | VIC_EINT3;
> }
>
> Am i missing anything? Advanced thanks for any suggestions.
>
> Thanks & regards,
> Mohan
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/lpc2000/
>
> * To unsubscribe from this group, send an email to:
> lpc2000-unsubscribe@yahoogroups.com
> <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>Message
Re: [lpc2000] LPC 2138: External interrupt3 not working
2005-06-14 by Richard Duits
Attachments
- No local attachments were found for this message.