12.3.1 Initialization
To put the device into a sleep mode, follow these steps:
-
Configure and enable the interrupts that are 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 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.