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, one active mode in which software is executed, and three sleep modes. The available sleep modes are; Idle, Standby, and Power-Down.
When the device enters a sleep mode, program execution is stopped, and depending on the entered sleep mode, different peripherals and clock domains are turned off.
To enter a sleep mode, the SLPCTRL must be enabled and the desired sleep mode
must be stated. The software decides when to enter that sleep mode by using a dedicated
SLEEP
instruction.
Interrupts are used to wake-up 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-up, and execute from the Reset vector.