SAM L10/L11 Sleep Modes

Last modified by Microchip on 2023/11/21 20:51

Sleep Mode Overview

The SAM L10/L11 has three Sleep modes available through the Power Manager (PM), as summarized in Table 1:

SAM L10 sleep modes table

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:

SAM L10 sleep modes overview

Figure 1

Back to Top

Related Peripherals

A related peripheral that controls Sleep modes is the Power Manager.

Back to Top

Sleep Mode Selection

After a device reset, the device is operating at Performance Level 0 (PL0) in Active mode.

SAM L10 sleep modes and performance level overview

Figure 2

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.

​There is a small latency between the store instruction and the actual writing of the SLEEPCFG register due to bridges. The software must ensure that the SLEEPCFG register reads the desired value before issuing a Wait For Interrupt (WFI) instruction.

Sleep mode is then entered by executing the WFI instruction.

Back to Top

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();

Back to Top