Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

external interrupt in ARM lpc1768 not working

Status
Not open for further replies.

mahyarab

Newbie level 4
Joined
Jan 6, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,310
this is my code:

volatile uint32_t eint0_counter;

void EINT0_IRQHandler ()
{
LPC_SC->EXTINT = EINT0;
eint0_counter++;

if ( eint0_counter & 0x01 )
{
LPC_GPIO0->FIOSET = 1<<22;
}
else
{
}
}

uint32_t EINTInit()
{
LPC_PINCON->PINSEL4 = 0x00100000;
LPC_GPIO0->FIODIR = 1<<22;
LPC_GPIO2->FIOCLR = 0x000000FF;

LPC_GPIOINT->IO2IntEnF = 0x200;

LPC_SC->EXTMODE = EINT0_EDGE;
LPC_SC->EXTPOLAR = 0;

NVIC_EnableIRQ(EINT0_IRQn);
return 0;
}

i thinks its not have any bugs but its note works for me.
when i enable external interrupt its not do any thing.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top