Reply by Tom Lucas April 4, 20072007-04-04
"abhay" <abhaym244@gmail.com> wrote in message 
news:1175669724.139043.127070@p77g2000hsh.googlegroups.com...
> hiiii > > i am using ARM LPC2138 for my application.For one of my devices i am > using its external interrupt pin .i am compliling my code in ARM > mode.i am able to compile my code in KEIL as well as GCC without any > warning.i am printing some values in my ISR routine. > > the problem is: > After executing the isr the system halts. Please suggest what could be > the problem. > > i am initialising my external interrupt registers EXTMODE & EXTPOLAR > to 0x00 > and interrupt vector registers as follows: > > VICINTSELECT &= ~0x00004000; > VICINTCTRL14 = ( unsigned long > int )external_isr ;..................address of external isr routine > VICINTCTRL14 = 0x0000002E ; > VICINTENABLE |= 0x00004000; > > in my isr i m printing some random values and resetting the flags and > interrupt vector address as follows: > > EXTINT |= 0x01 ; > VICVECTADDR = 0x00000000; resetting the interrupt vector address to 0 > > > Please suggest what could be the problem. > thank you
I don't think you want the VIC Vector Address set to 0x0000000 - that is the reset vector. You are also setting programming the Interrupt Control register with your vector to your handler and then overwriting it with the real control word. Perhaps you might want to look at putting the vector of your handler into the vector register for interrupt 14?
Reply by MisterE April 4, 20072007-04-04
"abhay" <abhaym244@gmail.com> wrote in message 
news:1175669724.139043.127070@p77g2000hsh.googlegroups.com...
> hiiii > > i am using ARM LPC2138 for my application.For one of my devices i am > using its external interrupt pin .i am compliling my code in ARM > mode.i am able to compile my code in KEIL as well as GCC without any > warning.i am printing some values in my ISR routine. > > the problem is: > After executing the isr the system halts. Please suggest what could be > the problem. > > i am initialising my external interrupt registers EXTMODE & EXTPOLAR > to 0x00 > and interrupt vector registers as follows: > > VICINTSELECT &= ~0x00004000; > VICINTCTRL14 = ( unsigned long > int )external_isr ;..................address of external isr routine > VICINTCTRL14 = 0x0000002E ; > VICINTENABLE |= 0x00004000; > > in my isr i m printing some random values and resetting the flags and > interrupt vector address as follows: > > EXTINT |= 0x01 ; > VICVECTADDR = 0x00000000; resetting the interrupt vector address to 0 > > > Please suggest what could be the problem. > thank you
Does your ISR return and function correctly? Vector does not look right...
Reply by Ali April 4, 20072007-04-04
On Apr 3, 11:55 pm, "abhay" <abhaym...@gmail.com> wrote:
> hiiii > > i am using ARM LPC2138 for my application.For one of my devices i am > using its external interrupt pin .i am compliling my code in ARM > mode.i am able to compile my code in KEIL as well as GCC without any > warning.i am printing some values in my ISR routine. > > the problem is: > After executing the isr the system halts. Please suggest what could be > the problem. > > i am initialising my external interrupt registers EXTMODE & EXTPOLAR > to 0x00 > and interrupt vector registers as follows: > > VICINTSELECT &= ~0x00004000; > VICINTCTRL14 = ( unsigned long > int )external_isr ;..................address of external isr routine > VICINTCTRL14 = 0x0000002E ; > VICINTENABLE |= 0x00004000; > > in my isr i m printing some random values and resetting the flags and > interrupt vector address as follows: > > EXTINT |= 0x01 ; > VICVECTADDR = 0x00000000; resetting the interrupt vector address to 0 > > Please suggest what could be the problem. > thank you
And what do you have in your isr? maybe isr is causing the system halt. ali
Reply by abhay April 4, 20072007-04-04
hiiii

i am using ARM LPC2138 for my application.For one of my devices i am
using its external interrupt pin .i am compliling my code in ARM
mode.i am able to compile my code in KEIL as well as GCC without any
warning.i am printing some values in my ISR routine.

the problem is:
After executing the isr the system halts. Please suggest what could be
the problem.

i am initialising my external interrupt registers EXTMODE & EXTPOLAR
to 0x00
and interrupt vector registers as follows:

VICINTSELECT &= ~0x00004000;
VICINTCTRL14  = ( unsigned long
int )external_isr ;..................address of external isr routine
VICINTCTRL14  = 0x0000002E ;
VICINTENABLE |= 0x00004000;

in my isr i m printing some random values and resetting the flags and
interrupt vector address as follows:

EXTINT |= 0x01 ;
VICVECTADDR = 0x00000000; resetting the interrupt vector address to 0


Please suggest what could be the problem.
thank you