avr-chat
[Top][All Lists]
Advanced

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

Re: [avr-chat] Interrupts from assync timer in sleepmode


From: Erik Christiansen
Subject: Re: [avr-chat] Interrupts from assync timer in sleepmode
Date: Thu, 22 Sep 2005 18:13:00 +1000
User-agent: Mutt/1.5.6+20040722i

On Thu, Sep 22, 2005 at 08:15:46AM +0200, Bjarne Laursen wrote:
> 
> What happens is that sometimes the output-compare-match happens just 
> before the sleep while the interrupt is disabled. Then the processor 
> will go to sleep with the interrupt flag set, and not wake up. (Can 
> anyone confirm that this will happen ?).

Bjarne,

   Page 13 of the ATmega32 datasheet shows example code for exactly this
case. The pending interrupt will then not be able to occur before the
cpu is in sleep mode, so your problem cases would seem to be excluded,
IIUC. (i.e. The interrupt is processed from sleep mode, after check
completion.)

   Surely, the cpu will "not wake up" only if the sei is not executed,
or the interrupt is individually masked?

Erik




reply via email to

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