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

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

Re: [avr-gcc-list] 2 interrupt sharing the same ISR


From: gouy yann
Subject: Re: [avr-gcc-list] 2 interrupt sharing the same ISR
Date: Sat, 15 Jan 2005 02:48:43 +0100 (CET)

 --- David Kelly <address@hidden> a écrit : 
> 
> On Jan 14, 2005, at 4:21 PM, gouy yann wrote:
> 
> > I'd like to know if someone has an easy trick to
> make
> > 2 interrupts ( timer overflow and timer output
> compare
> > ) jump to the same address (ISR).
> 
> So how would you know which event launched the
> service routine?

both cases are for the timer0 (ATmega32) but
sometimes, it is configured for overflow and sometimes
for compare. depending on the configuration, the call
back won't be the same neither.

> 
> The AVR is unique among MCUs I have used in that the
> IRQ flag is 
> automatically cleared by the MCU when the service
> vector is loaded. On 
> other CPUs if one is clumsy and doesn't clear the
> flag then the RTI 
> infinite loops right back to your service routine
> and one never gets 
> out of IRQ space back to user space.

yes, the feature is really nice, it is one thing less
to remember.
but, in my case, it won't have been a problem.

   Yann




        

        
                
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/


reply via email to

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