33
2503P–AVR–07/10
ATmega32(L)
Idle Mode When the SM2..0 bits are written to 000, the SLEEP instruction makes the MCU enter Idle
mode, stopping the CPU but allowing SPI, USART, Analog Comparator, ADC, Two-wire Serial
Interface, Timer /Co unte rs, Wa tchdog, a nd the int erru pt syste m to con tinue o pe ratin g. This sleep
mode basically halts clkCPU and clkFLASH, while allowing the other clocks to run.
Idle mode enables the M CU to wake up from external triggered interrupts as well a s internal
ones like the Timer O verflow and USART Transmit Complete interru pts. If wake-up from the
Analog Comparato r interrupt is not required , the Analog Comparator can b e powered down by
setting the ACD bit in the Analog Comparator Control and Status Register – ACSR. This will
reduce power consumption in Idle mode. If the ADC is enabled, a conversion starts automati-
cally when this mode is entered.
ADC Noise
Reduction Mode When the SM2..0 bits are written to 001, the SLEEP instruction makes the MCU enter ADC
Noise Reduction mod e, stopping the CPU but allowing the ADC, the External Interrup ts, the
Two-wire Serial Interface address watch, Timer/Counter2 and the Watchdog to continue operat-
ing (if enabled). This sleep m ode basically halts clkI/O, clkCPU, and clkFLASH, while allowing the
other clocks to run.
This improves the noise environment for the ADC, enabling higher resolution measurements. If
the ADC is enabled, a conve rsion star ts automa tically when this mode is enter ed. Apart form the
ADC Conversion Complete interrupt, only an External Reset, a Watchdog Reset, a Brown-out
Reset, a Two-wire Serial Interface Address Match Interrupt, a Timer/Counter2 inte rrupt, an
SPM/EEPROM ready interrupt, an External level interrupt on INT0 or INT1, or an external inter-
rupt on INT2 can wake up the MCU from ADC Noise Reduction mode.
Power-down Mode When the SM2..0 bits are written to 010, the SLEEP instruction makes the MCU enter Power-
down mode. In this mode, the External Oscillator is stopped, while the External interrupts, the
Two-wire Serial Interface a ddress watch, and the Watchdog continu e operating (if enabled).
Only an External Reset, a Watchdog Reset, a Brown-out Reset, a Two-wire Serial Interface
address match interrupt, an External level interrupt on INT0 or INT1, or an External interrupt on
INT2 can wake up the MCU. This sleep mo de basically halts a ll gene rated clo cks, allowin g oper-
ation of asynchronous modules only.
Note that if a level triggered interrupt is used for wake-up from Power-down mode, the changed
level must be held for some time to wake up the MCU. Refer to “External Interrupts” on page 66
for details.
When waking up from Power-down mode, there is a delay from the wake-up condition occurs
until the wake-up becomes effective. This allows the clock to restart and become stable after
having been stopped. The wake-up period is defined by the same CKSEL fuses that define the
reset time-out period, as described in “Clock Sources” on page 25.
Power-save Mode When the SM2..0 bits are written to 011, the SLEEP instruction makes the MCU enter Power-
save mode. This mode is identical to Power-down, with one exception:
If Timer/Counter2 is clocked asynchronously, that is, the AS2 bit in ASSR is set, Timer/Counter2
will run during sleep. The device can wake u p from either Timer Overflow or Output Compare
event from Timer/Counter2 if the corresponding T imer/Counter2 interrupt enable bits are set in
TIMSK, and the Global Interrupt Enable bit in SREG is set.
If the Asynch ronous Tim er is NOT clocked asynchronously, Power-down mode is r ecommended
instead of Power-save mode because the contents of the registers in the Asynchronous Time r
should be considered undefined after wake-up in Power-save mode if AS2 is 0.
This sleep mode basically halts all clocks except clkASY, allowing opera tion only of asynchronous
modules, includin g T ime r/ Co un te r2 if clocke d as yn ch ro no us ly.