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: gouy yann
Subject: Re: [avr-gcc-list] Looking for a spurious interrupt
Date: Fri, 3 Sep 2004 13:12:59 +0200 (CEST)

Hi all,

I have another suggestion but it's tricky to implement
because mainly in assembler.

in the interrupt vector, instead of "jumping" to the
ISR, call it.
this way, you'll have, in the stack, the address of
the interrupt vector.
don't forget to pop the address before the "reti"
opcode but don't use the "ret" elsewhere you'll call
the ISR several times up to a "jumping" one!

regards.
    Yann


 --- Trevor White <address@hidden> a écrit : 
> When you say you have a spurious interrupt. I take
> it you have all the 
> interrupts enabled for everything? Are you able to
> turn everything off 
> and then start turning interrupts on one by one...
> 
> Another thought is could you use a register to
> identify what routine you 
> were running when the interrupt occurs. For example
> 
> IDInterruptRegister = 0
> 
> int main(void)
> {
>     IDInterruptRegister = 1;
>     Somefunction();
>     IDInterruptRegister = 2;
>     ..more code...
>     ...
>     ...
>     IDInterruptRegister = 3;
> }
> 
> Maybe this would enable you to gain focus on the
> part of the software 
> where the interrupt is happening. Might not help
> with some interrupts 
> but thought it might trigger something.
> 
> Trev
> 
> 
> Bernard Fouché wrote:
> 
> >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
> >Rene
> >
> >
> >_______________________________________________
> >avr-gcc-list mailing list
> >address@hidden
> >http://www.avr1.org/mailman/listinfo/avr-gcc-list
> >
> >
> >  
> >
> 
> 
> 
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list
>  

=====



        

        
                
Vous manquez d’espace pour stocker vos mails ? 
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour 
dialoguer instantanément avec vos amis. A télécharger gratuitement sur 
http://fr.messenger.yahoo.com


reply via email to

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