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.
when I checked pending, became active and program continued with interrupt subroutine while there wasn't any rising edge of pulse at pin.
I may be able to get a simplified EV board of LPC1343 in few days, once I get the hardware, I will do some tests to identify if this is a simulator issue.
Looks like when you manually generate a rising edge signal, GPIOs peripheral triggers an interrupt, but core peripheral NVIC does not catch it.
Hello. Your assistance in this time, thank you. Today I practice test, everything is okay. Keil simulator was the problem.