avr-chat
[Top][All Lists]
Advanced

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

Re: [avr-chat] Power save mode in ATtiny85 vs avr-libc


From: Chris Kuethe
Subject: Re: [avr-chat] Power save mode in ATtiny85 vs avr-libc
Date: Sun, 3 Jan 2010 07:35:40 -0800

On Sat, Jan 2, 2010 at 11:50 PM, Joerg Wunsch <address@hidden> wrote:
> If you manage to operate timer/counter 2 asynchronously from a
> 32 kHz crystal, avr-libc will support power-save mode for your
> ATtiny85. ;-)

I thought about that, and I am using timer2 as a wake source in
another project, but the ATtiny85 doesn't have a timer2, nor does it
have any other timers that can wake it up. Well, it has the watchdog,
and that's what I ended up using. The ATtiny 25/45/85 datasheet
defines the following wake-up sources:

INT0 and Pin Change
SPM/EEPROM Ready
USI Start Condition
ADC
Other I/O
Watchdog Interrupt

no timers....

> So yes, it's a bug in avr-libc, but a very minor one.  The difference
> between power-down and power-save mode is that in the latter,
> timer/counter 2 will remain operational, with the intention that it
> can be clocked asynchronously from a 32 kHz crystal.  Obviously, for
> hardware that does not support this modus of operation, power-save
> mode makes no sense.

ACK. I wanted to use power save mode rather than power down, since the
main clock is still running and that lets me lower the part count.
I've rewritten my code to use the watchdog to wake up; it seems to
work well enough.

CK



-- 
GDB has a 'break' feature; why doesn't it have 'fix' too?




reply via email to

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