Exiting a Sleep Mode

The microcontroller wakes up from sleep when it receives an interrupt. This implies that the global interrupts must be enabled to wake up from sleep. Depending on the sleep mode, only some sources will wake up the device.

In Idle sleep mode, any enabled interrupt source will wake up the device.

In Standby sleep mode, only the peripherals configured to run in Standby sleep mode can generate interrupts.

In Power-Down sleep mode, only the interrupts from the PIT, Watchdog, pin changes, TWI address match, and CCL with filter and edge-detect disabled can wake up the device.

It takes six clock cycles to wake up from sleep plus the time necessary for the main oscillator and regulator to start when waking up from Standby or Power-Down sleep mode.