13.3.1 Initialization
To put the device into a sleep mode, follow these steps:
-
Configure and enable the interrupts that can wake the device from sleep.
Enable also the 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 which sleep mode to enter, and enable the Sleep Controller by writing to the
Sleep Mode (SMODE) bit field and the Enable (SEN) bit in the Control A
(SLPCTRL.CTRLA) register.
The
SLEEP
instruction must be executed to make the device go to sleep.