3.10.5 Sleep Modes and Active Power Reduction

Sleep modes enable the application to shut down unused modules in the MCU to save power. The AVR provides various sleep modes.

To enter any of the sleep modes, the SE bit in SMCR must be written to logic ‘1’ and a SLEEP instruction must be executed. The SM[2:0] bits in the SMCR register select which sleep mode (idle, extended power save power down, power save) is activated by the AVR SLEEP instruction. If an enabled interrupt occurs while the MCU is in a sleep mode, the MCU wakes up. The MCU is, then, stopped for four cycles in addition to the start-up time, executes the interrupt routine and resumes execution from the instruction following SLEEP. The contents of the register file and SRAM are not altered when the device wakes up. If a reset occurs during sleep mode, the MCU wakes up and executes from the reset vector. Figure 3-57 on page 300 presents an overview of the clocks and their distribution. The following table shows the available sleep modes with the corresponding active clock domains and wake-up sources.

Note: If a level triggered interrupt is used for wake-up from any sleep mode, the changed level must be held for some time to wake up the MCU. Refer to External Interrupts for details.

Idle Mode

When the SM[2:0] bits are written to “0b000”, the SLEEP instruction makes the MCU enter the idle mode, stopping the CPU but allowing the peripherals, e.g., SPI, RX/TX DSP, timer and the interrupt system to continue operating. This sleep mode basically stops CLKCPU and CLKNVM while allowing the other clocks to run.

Idle mode enables the MCU to wake up from externally-triggered interrupts as well as internal interrupts such as the timer overflow and a transmit buffer empty interrupt or a receive buffer full interrupt of the on-chip digital data demodulator.

Extended Power-Save Mode

When the SM[2:0] bits are written to “0b001”, the SLEEP instruction makes the MCU enter the extended power-save mode, stopping the CPU and the peripherals on the I/O bus but allowing the SPI, RX/TX DSP, timer, watchdog and the interrupt system to continue operating. This sleep mode basically stops CLKCPU, CLKI/O and CLKNVM while allowing the other clocks to run.

The extended power-save mode enables the MCU to wake up from external triggered interrupts as well as internal interrupts such as the timer overflow and a transmit buffer empty interrupt or a receive buffer full interrupt of the on-chip digital data demodulator.

Power-Save Mode

When the SM[2:0] bits are written to “0b011”, the SLEEP instruction makes the MCU enter the power-save mode. In this mode, the FRC oscillator and the external input clock are stopped, while the external interrupts and the watchdog continues operation (if enabled). Only an external reset, a watchdog reset, RX DSP interrupts, an external level interrupt, or a pin change interrupt can wake up the MCU. This sleep mode basically stops all generated clocks, allowing operation of asynchronous modules only.

Power Down Mode

When the SM[2:0] bits are written to “0b010”, the SLEEP instruction makes the MCU enter power-down mode, stopping the CPU and the peripherals on the I/O bus but allowing the RX DSP interrupts, timer and the asynchronous interrupts to continue operating. This sleep mode basically stops all generated clocks, allowing operation of asynchronous modules only.

Table 3-75. Sleep Modes: Active Clock Domains and Wake-Up Sources

Active Clock Domains

Oscillators and External Clocks

Wake-Up Sources

Sleep Mode

CLKCPU

CLKNVM

CLKI/O

CLKT

External Clock

CLKFRC

CLKSRC

CLKWDT

CLKXTO2,4,6

CLKADIV

CLKVDIV

INT0/1 and Pin Change

UHF-Receiver

EEPROM

SPI

SSM

Supply

Ext. input clock monitor

Timer0

Timer1/2/3/4

Timer5

IDLE

X

X

X

X

X

X

X (1)

X

(2)

X

X

X

X

X

X

X

X

X

X

Extended Power-Save

X

X

X

X

X

X (1)

X

(2)

X

X

X

X

X

X

Power-Save

(4)

X

X

X (1)

X

(2)

X

X

X

X

Power-Down

(4)

X (3)

X (3)

X (1)

(2)

X

X

X

X

Note:
  1. Only, if XTO and AVCC voltage regulator are enabled in the RF front end.
  2. Active only if enabled.
  3. Turned off if not selected as clock source for the AVR or any peripheral (e.g., timer), the watchdog is disabled by fuse and the CMCR.SRCD bit is set.
  4. Active only if forced on by CMOCR.FRCAO or used by the port debouncing logic.