Dear All,
I have encountered a problem in simulating the following code on MDK-Lite Keil version 4.74.022. The ISR routine is not being executed during simulation with Keil V4.74 evaluation version only. This code runs on hardware and on Keil V3.36 simulator. I don't know what may be wrong with my MDK-Lite Keil version 4.74.022, maybe start-up file, but still don't know how to fix it.
Thanks for your help.
#include <LPC21xx.h> #define LED (1<<0) void Trigger_EXT_Int(void) __irq { if( (LED & IOPIN0) == LED) { //checking the state of the pin IOCLR0=LED; } else { IOSET0=LED; } EXTINT=LED; //CLEAR EXTENAL FLAG FOR EXTINT EGISTER VICVectAddr=0x00; } int main(void) { PINSEL0=0x0000000C; //set P0.1 as external interrupt PINSEL1=0x00000000; IODIR0=0xFFFD; //set as output P0.0 EXTMODE=0x01 ; //edge sensitive is selected in EINT0 pin; EXTPOLAR=0x0 ; //active on negative edge on P0.1 VICIntSelect=0; //CLASSIFIES INTERRUPTS AS EITHER FIQ or IRQ.Put a 1 for FIQ or 0 for IRQ. VICVectCntl0=14 | 32; //channel 14 is for ext int| enable bit 5 VICIntEnable=0x00004000 ; VICVectAddr0= (unsigned long)Trigger_EXT_Int ; IOCLR0=LED; while(1); }
Problem Solved after configuring Linker settings.