Discussion group dedicated to the Philips LPC2000 family of ARM MCUs
attribute declartion of irq in LPC2378 using keil Compiler - sukhdeep singh - Jun 4 7:09:36 2009
I have written the following code for irq in LPC2378 using keil Compiler
#include
void f(void) __attribute__((interrupt("IRQ")));
unsigned char counter;
int main()
{=A0=A0=A0 VICIntEnClr=3D1<<4;
=A0=A0=A0=A0 VICIntEnable=3D1<<4;
=A0=A0=A0=A0 VICVectAddr4=3D(unsigned long)f;
=A0=A0=A0=A0 VICVectCntl4=3D1<<4;
=A0
=A0=A0=A0=A0 T0MR0=3D100;
=A0=A0=A0=A0 T0MCR=3D3;
=A0=A0=A0=A0 T0TCR=3D1;
=A0=A0=A0=A0 while(1);
}
void f(void)
{=A0=A0 counter++;
=A0=A0=A0 T0IR=3D1;
=A0=A0=A0 VICVectaddr=3D0;
}
when value of matches with MR0(on reaching 100), it generate interrupt and =
does not come out of interrupt routine.
but if use void f(void) __irq;
it is working fine.
why is it not working for attribute declaration
how problem can be solved using attribute.
Thanks
Explore and discover exciting holidays and getaways with Yahoo! India=
Travel http://in.travel.yahoo.com/
[Non-text portions of this message have been removed]
------------------------------------

(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )
Re: attribute declartion of irq in LPC2378 using keil Compiler - Timo - Jun 4 11:04:55 2009
sukhdeep singh wrote:
> I have written the following code for irq in LPC2378 using keil Compiler
> #include
void f(void) __attribute__((interrupt("IRQ")));
> but if use void f(void) __irq;
> it is working fine.
> why is it not working for attribute declaration
Wild guess: Because you are using Keil.
> how problem can be solved using attribute.
If I guessed right, by using gcc.
--
Timo
------------------------------------

(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )Re: attribute declartion of irq in LPC2378 using keil Compiler - sukhdeep singh - Jun 5 1:57:51 2009
Thanks
--- On Thu, 4/6/09, Timo
wrote:
From: Timo
Subject: Re: [lpc2000] attribute declartion of irq in LPC2378 using keil Compiler
To: l...@yahoogroups.com
Date: Thursday, 4 June, 2009, 8:04 AM
sukhdeep singh wrote:
> I have written the following code for irq in LPC2378 using keil Compiler
> #include
>
> void f(void) __attribute_ _((interrupt( "IRQ")));
> but if use void f(void) __irq;
> it is working fine.
> why is it not working for attribute declaration
Wild guess: Because you are using Keil.
> how problem can be solved using attribute.
If I guessed right, by using gcc.
--
Timo
Explore and discover exciting holidays and getaways with Yahoo! India Travel
http://in.travel.yahoo.com/
[Non-text portions of this message have been removed]
------------------------------------

(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )