avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Default interrupt question


From: Bob Paddock
Subject: Re: [avr-gcc-list] Default interrupt question
Date: Sat, 20 Aug 2005 11:51:16 -0400
User-agent: KMail/1.7.2

On Saturday 20 August 2005 11:34 am, wbounce wrote:
> I have a default interrupt routine in all of my programs to catch stray
> interrupts instead of having them reset.  Basically it does nothing
> SIGNAL(__vector_default)
> {
> ;
> }

I usually put a counter in such a routine to know if it has ever been called.
Makes easier to expose latent bugs.

> Is there a way to tell which interrupt caused it to jump to this code?

What I have done in other parts, when I have the space, is have the vectors 
jump to a call.  The call then calls the same interrupt catcher cod for all 
vectors.  Then in the interrupt catcher you can examine the stack to see what 
was pushed to find out how how you got there.   You also need a return after 
the calls or pop that return address from the stack.  Not sure that all of  
this can be done on the AVR?


-- 
                          http://www.softwaresafety.net/
 http://www.unusualresearch.com/ http://www.bpaddock.com/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]