EmbeddedRelated.com
Forums

external interrupt (EINT1) problem.... plz help

Started by Balamurugan S April 26, 2011
Good day to every one,
I do have a problem with external interrupt triggering (EINT1). Iam connecting EINT1 as a Vectored Interrupt source to slot 0. Once executing in the test board of LPC 2129 ARM7 controller, it is not getting triggered when EINT1 switch is pressed.
Iam attaching the code: please help me in debugging the code:?:
******************************************************************
#include void EXTINTVectoredIRQ(void) __irq;
void main(){ IODIR1=0X00FF0000; // make port1 LED pins as o/p PINSEL0=0X000000c0; //Change GPIO as INT1
VICIntEnable=0X00008000; // Enable INT1 VICVectCntl0=0x0000002F; // connecting the INT1 interrupt channel to slot 0, and enabling the interrupt VICVectAddr0=(unsigned)EXTINTVectoredIRQ; IOCLR1=0X00FF0000; // Clear LED'swhile(1);}void EXTINTVectoredIRQ(void) __irq{ IOSET1=0X00FF0000; // set leds EXTINT=0X00000002;
// disable EINT 1 VICVectAddr0=0x00000000; // dummy write}*****************************************************************Many thanks in advance !
BALA MURUGAN

An Engineer's Guide to the LPC2100 Series

Check the errata sheet on that processor, I recall a problem with the setting up EINT1 of that function
Regards
Jean-Jacques

--- In l..., Balamurugan S wrote:
>
>
> Good day to every one,
> I do have a problem with external interrupt triggering (EINT1). Iam connecting EINT1 as a Vectored Interrupt source to slot 0. Once executing in the test board of LPC 2129 ARM7 controller, it is not getting triggered when EINT1 switch is pressed.
> Iam attaching the code: please help me in debugging the code:?:
> ******************************************************************
> #include void EXTINTVectoredIRQ(void) __irq;
> void main(){ IODIR1=0X00FF0000; // make port1 LED pins as o/p PINSEL0=0X000000c0; //Change GPIO as INT1
> VICIntEnable=0X00008000; // Enable INT1 VICVectCntl0=0x0000002F; // connecting the INT1 interrupt channel to slot 0, and enabling the interrupt VICVectAddr0=(unsigned)EXTINTVectoredIRQ; IOCLR1=0X00FF0000; // Clear LED'swhile(1);}void EXTINTVectoredIRQ(void) __irq{ IOSET1=0X00FF0000; // set leds EXTINT=0X00000002;
> // disable EINT 1 VICVectAddr0=0x00000000; // dummy write}*****************************************************************Many thanks in advance !
> BALA MURUGAN
>

Read the pin configuration register,where u need to declare external pin 1. Check whether u have declared it as gpio.

Read pinsel register

On Tue, 26 Apr 2011 01:11 PDT Jean-Jacques Dauchot wrote:

>
>Check the errata sheet on that processor, I recall a problem with the setting up EINT1 of that function
>Regards
>Jean-Jacques
>--- In l..., Balamurugan S wrote:
>>
>>
>> Good day to every one,
>> I do have a problem with external interrupt triggering (EINT1). Iam connecting EINT1 as a Vectored Interrupt source to slot 0. Once executing in the test board of LPC 2129 ARM7 controller, it is not getting triggered when EINT1 switch is pressed.
>> Iam attaching the code: please help me in debugging the code:?:
>> ******************************************************************
>> #include void EXTINTVectoredIRQ(void) __irq;
>> void main(){ IODIR1=0X00FF0000; // make port1 LED pins as o/p PINSEL0=0X000000c0; //Change GPIO as INT1
>> VICIntEnable=0X00008000; // Enable INT1 VICVectCntl0=0x0000002F; // connecting the INT1 interrupt channel to slot 0, and enabling the interrupt VICVectAddr0=(unsigned)EXTINTVectoredIRQ; IOCLR1=0X00FF0000; // Clear LED'swhile(1);}void EXTINTVectoredIRQ(void) __irq{ IOSET1=0X00FF0000; // set leds EXTINT=0X00000002;
>> // disable EINT 1 VICVectAddr0=0x00000000; // dummy write}*****************************************************************Many thanks in advance !
>> BALA MURUGAN
>>