Sleep modes are used to shut down peripherals and clock domains in the device in order to save power. The Sleep Controller (SLPCTRL) controls and handles the transitions between Active and Sleep mode.

There are in total four modes available:

All Sleep modes are available and can be entered from Active mode. In active mode, the CPU is executing application code. When the device enters Sleep mode, program execution is stopped and interrupts or a Reset is used to wake the device again. The application code decides which Sleep mode to enter and when.

Interrupts are used to wake the device from sleep. The available interrupt wake-up sources depend on the configured Sleep mode. When an interrupt occurs, the device will wake up and execute the interrupt service routine before continuing normal program execution from the first instruction after the SLEEP instruction. Any Reset will take the device out of a Sleep mode.

The content of the register file, SRAM and registers are kept during Sleep. If a Reset occurs during Sleep, the device will Reset, start, and execute from the Reset vector.