Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | LPC2000 | attribute declartion of irq in LPC2378 using keil Compiler

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 )