11.3.1 Initialization
To put the device into a sleep mode, follow these steps:
- Configure and
enable the interrupts that shall be able to wake the device from
sleep. Also, enable global interrupts. Warning: If there are no interrupts enabled when going to sleep, the device cannot wake up again. Only a Reset will allow the device to continue operation.
- Select the sleep mode to be entered
and enable the Sleep Controller by writing to the Sleep Mode bits (SMODE) and the
Enable bit (SEN) in the Control A register (SLPCTRL.CTRLA). A
SLEEP
instruction must be run to make the device actually go to sleep.