Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

Having trouble getting interrupts to work on GNUARM + LPC2106

Having trouble getting interrupts to work on GNUARM + LPC2106

2005-06-28 by chabely_k99

Does anyone have a simple example including a startup.s file that I 
can compile in GCC that demonstrates how to use interrupts? I've 
looked at and have tried many examples. I can get the interrupt to 
fire once but never again. I think the interrupt isn't being reset 
correctly within the ISR. I'm usings the following ISR function. I 
can get the ISR to work correctly using the Imagecraft ARM compiler. 
Same LED.c file but different startup.s file. The Imagecraft compiler 
is doing something behind the scenes that allow the interrupts to 
work that I don't understand.

void TimerMatch( void ) __attribute__ ((interrupt ("IRQ")));
void TimerMatch( void )
    {
	p+=1;
	LED_OFF ;
	
    TIMER0_IR = 0x1;   // clr Timer interrupt
    VICVectAddr = 0xFF;

    }

Thanks!

Re: [lpc2000] Having trouble getting interrupts to work on GNUARM + LPC2106

2005-06-28 by Richard

At 03:07 PM 6/28/2005, chabely_k99 wrote:

>Does anyone have a simple example including a startup.s file that I
>can compile in GCC that demonstrates how to use interrupts? I've
>looked at and have tried many examples. I can get the interrupt to
>fire once but never again. I think the interrupt isn't being reset
>correctly within the ISR. I'm usings the following ISR function. I
>can get the ISR to work correctly using the Imagecraft ARM compiler.
>Same LED.c file but different startup.s file. The Imagecraft compiler
>is doing something behind the scenes that allow the interrupts to
>work that I don't understand.

No, we don't do anything behind the scene. We just have good examples etc. 
There are some tricks to use the VIC, read the examples and docs carefully.


>void TimerMatch( void ) __attribute__ ((interrupt ("IRQ")));
>void TimerMatch( void )
>     {
>         p+=1;
>         LED_OFF ;
>
>     TIMER0_IR = 0x1;   // clr Timer interrupt
>     VICVectAddr = 0xFF;
>
>     }
>
>Thanks!

// richard (This email is for mailing lists. To reach me directly, please 
use richard at imagecraft.com)

Re: [lpc2000] Having trouble getting interrupts to work on GNUARM + LPC2106

2005-06-29 by Robert Adsett

At 10:07 PM 6/28/05 +0000, chabely_k99 wrote:
>Does anyone have a simple example including a startup.s file that I
>can compile in GCC that demonstrates how to use interrupts?

There's one with the newlib-lpc stuff ( 
http://www.aeolusdevelopment.com/Articles/download.html ).  I believe there 
are others around as well.  I suspect that you need the dispatch code added 
to the startup, feel free to use the startup with the newlib-lpc as a 
resource to grab it from.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.