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

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

Re: [avr-gcc-list] Looking for a spurious interrupt


From: René Liebscher
Subject: Re: [avr-gcc-list] Looking for a spurious interrupt
Date: Fri, 03 Sep 2004 12:04:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040617

Bernard Fouché wrote:
Hi.

Using SIGNAL(__vector_default), I'm tracking a problematic unexpected
interrupt. How can I know what interrupt called SIGNAL(__vector_default)
from the body of the function that I define?

For instance:

SIGNAL(__vector_default)
{
        .. code to known what vector was activated ...
        .. code to store this information somewhere ...
}

Thanks!

  Bernard

I have no idea how to get the information which interrupt was called.
But you could create handlers for every possible interrupt.
Probably you want to use a script for the task.

For the Mega32 this could be done like the following.
(should be all in one  line)

cat /usr/avr/include/avr/iom32.h
| grep "#define SIG_"
| awk 'BEGIN{print "#include <avr/signal.h>";
             print "#define NUMBER_OF_VECTOR(x) x" };
      { printf("SIGNAL(%s){ save=NUMBER_OF%s; };\n",$2,$3); }'

Then you only have to delete the interrupts you use already in your program. (and change the "save=" statement to what ever you like.)

Kind regards
Rene


reply via email to

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