SAM L10/L11 Sleep Modes
Sleep Mode Overview
The SAM L10/L11 has three Sleep modes available through the Power Manager (PM), as summarized in Table 1:
Each Sleep mode offers different flexibility and capability for the device to wake up. Figure 1 shows the resultant device status across all Sleep modes:
Related Peripherals
A related peripheral that controls Sleep modes is the Power Manager.
Sleep Mode Selection
After a device reset, the device is operating at Performance Level 0 (PL0) in Active mode.
While the performance level selection is done through the selection bits in the Performance Level Configuration register (PLCFG.PLSEL), the Sleep Mode configuration bits are in the Sleep Configuration register (SLEEPCFG.SLEEPMODE). These bits are used to select the level of the Sleep mode.
Sleep mode is then entered by executing the WFI instruction.
Code Example
Configuring the Device in STANDBY Sleep Mode Allowing the Device to Get the Best Power Efficiency
*** Configuring the Device in STANDBY sleep mode
*** Selecting the STANDBY mode in the (SLEEPCFG.SLEEPMODE) register
***/
PM->SLEEPCFG.bit.SLEEPMODE = PM_SLEEPCFG_SLEEPMODE_STANDBY_Val;
/*** Ensure register is written before issuing wfi command ***/
while(PM->SLEEPCFG.bit.SLEEPMODE!=PM_SLEEPCFG_SLEEPMODE_STANDBY_Val);
/*** WAIT FOR IRQ instruction ***/
__WFI();