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

GPIO interrupts in the LPC1313

Hi
I'm working with keil
And I'm going to use a GPIO interrupt. And the pin PIO0_1
I wrote this program

#include <LPC13xx.h>

void PIOINT0_IRQHandler(void) {
LPC_GPIO2->DATA=0xaaa;
LPC_GPIO0->IC = (1<<1);
}

int main(void){

LPC_GPIO0->DIR = 0x000;
LPC_GPIO2->DIR = 0xfff;

LPC_GPIO0->IS = 0x0;
LPC_GPIO0->IBE = 0x2;
LPC_GPIO0->IEV = 0x0;
LPC_GPIO0->IE = 0x2;

NVIC_SetPriority(EINT0_IRQn,0);
NVIC_EnableIRQ(EINT0_IRQn);

while(1){
LPC_GPIO2->DATA=0xf0f;
LPC_GPIO2->DATA=0x0f0;
}

}

But it does not work in keil simulator.
Anyone knows the problem?
Thanks.

0