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.

fast interrupt in LPC2148

Status
Not open for further replies.

sushil909

Newbie level 2
Joined
May 13, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
I am a beginner to the ARM series.

I want to use the 3 external interrupts. ENT1 as Fast interrupts and ENT2 and 3 as Vectored interrupt.

I simulated the code in my circuit in ISIS (proteus). none of the interrupt seems to be working.

Is there any problem in the code given below or is there anything i am missing.

Is there any way i can know whether my interrupts are working in keil uvision4.

Code:
#include <LPC21xx.h>
#include "pwm.h"

void FIQ_Handler(void)
{
	IOSET1=0xFF000000;

	EXTINT = (1<<1);// Clear the peripheral interrupt flag for ENT1
}

void EXTINT2VectoredIRQ(void)  __irq	
{
	IOSET1=0xFF000000;

	EXTINT = (1<<2);// Clear the peripheral interrupt flag for ENT2
	VICVectAddr = 0x00000000;
}

void EXTINT3VectoredIRQ(void)  __irq
{

	EXTINT = (1<<3); // Clear the peripheral interrupt flag for ENT3
	VICVectAddr = 0x00000000;
}

int main()
{

   	IODIR1 = 0xFFF00000;
	IODIR0 = 0x00F00000;
//initialize the interrupts
	
	PINSEL0|=0xA00C0055; //enable pin functioning of UART0,I2C0,ENT1,ENT2,ENT3
	VICIntSelect|=0x00008000; //set ENT1 as FIQ
	

	EXTMODE|=0x0E;	   //edge interrupt for ENT1,ENT2 and ENT3
	EXTPOLAR|=0x0E;    //rising edege for all the interrupts

    VICVectCntl0 = 0x00000030; //set ENT2 to vectaddress0 
	VICVectAddr0 = (unsigned long)EXTINT2VectoredIRQ;
	VICVectCntl1 = 0x00000031; //set ENT3 to vectaddress1
	VICVectAddr1 = (unsigned long)EXTINT3VectoredIRQ;
	
	VICIntEnable =(1<<15)|(1<<16)|(1<<17); //enable ENT1,ENT2 and ENT3 interrupts


//-------------------------------------------------


	pwmInit();
	pwmFrequency (10);
	
	while(1)
	{  	
	}


}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top