[Top][All Lists]

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

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

From: Bernard Fouché
Subject: RE: [avr-gcc-list] Looking for a spurious interrupt
Date: Fri, 3 Sep 2004 12:16:55 +0200

Hi René.

I've thought of that, but it will generate one handler per signal and at the
moment I'm very tight in memory and, if possible, I would prefer to read a
particular register, if ever such a register presenting this information
exist. Otherwise I'll do something like you describe.

-----Message d'origine-----
De : René Liebscher [mailto:address@hidden
Envoyé : vendredi 3 septembre 2004 12:04
À : Bernard Fouché
Cc : address@hidden
Objet : Re: [avr-gcc-list] Looking for a spurious interrupt

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

reply via email to

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