To put the device into a sleep mode, follow these steps:

  1. 1. 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.
  2. 2. 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.