Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

LPC 2138: External interrupt3 not working

LPC 2138: External interrupt3 not working

2005-06-14 by Mohan K

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

Re: [lpc2000] LPC 2138: External interrupt3 not working

2005-06-14 by Richard Duits

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:
Show quoted textHide quoted text
> 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/>.
>
>

Re: LPC 2138: External interrupt3 not working

2005-06-14 by Karl Olsen

--- In lpc2000@yahoogroups.com, Richard Duits <yahoo@r...> wrote:

> 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.

However, the EXTMODE and EXTPOLAR issues should be fixed in LPC213x.

Karl Olsen

Re: [lpc2000] LPC 2138: External interrupt3 not working

2005-06-14 by Mohan K

Hi Richard,
              Thanks for your reply.I removed "VICVectCntl4 > = (0 <<
5)| VIC_EINT3;" line form the program.
             I missed "VICIntEnable = VIC_BIT(VIC_EINT3);" in my
enableEXTinterrupt() function. Now External interrupt is working.

              Though it is working, I am facing a new problem. ISR
executes only for the first time. It fails for rest of the interrupts.
I don't know why this is happening.

Thanks & Regards,
Mohan
Show quoted textHide quoted text
On 6/14/05, Richard Duits <yahoo@...> wrote:
> 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/>.
> >
> >
> 
> 
> ________________________________
> 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
>   
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.