Taking the temperature monitoring application one step further on the road to low power consumption, the SleepWalking feature available in devices from the SAM D and SAM L series can be used. SleepWalking is when a device can provide its peripherals with a clock only when needed, without waking the CPU. This feature is enabled by writing a one to the On Demand bit in the corresponding clock source register (XOSC/XOSC32K/OSC32K/OSC8M.ONDEMAND).

For the temperature monitoring application this means that the ADC's peripheral clock (GCLK_ADC) will only be running when the ADC is converting. When the ADC receives the overflow event from the RTC, it will request its generic clock from the Generic Clock Controller and GCLK_ADC will start running. GCLK_ADC will stop as soon as the ADC conversion is completed.
Note: When using STANDBY as sleep mode the peripheral must be configured to run in standby. Writing a one to the Run in Standby bit in the peripheral's control register, Control A for ADC (CTRLA.RUNSTDBY), will enable the peripheral to run in standby.
Devices in the SAM L21 series have five power domains where unused power domains can be set to a low power state. Setting power domains to a low power state can be configured to happen dynamically during SleepWalking. For the temperature monitoring application, the device can be configured to set the power domain where the ADC is located to a low power state when the ADC is idle. For further information about power domains, refer to Performance Levels and Power Domains.
Note: Using dynamically power domains during SleepWalking will result in a responsiveness penalty, as turning on power domains is relatively time consuming.