38.6.13 Sleep Mode Operation

The AC will continue to operate in any sleep modes where the selected source clock is running. The AC’s interrupts can be used to wake up the device from sleep modes. Events connected to the event system can trigger other operations in the system without exiting sleep modes.

The Run in Standby bits in the Comparator x Control registers (COMPCTRLn.RUNSTDBY) control the behavior of the AC during Standby Sleep mode. Each RUNSTDBY bit controls one comparator. When the bit is zero, the comparator is disabled during Sleep mode, but maintains its current configuration. When the bit is one, the comparator continues to operate during Sleep mode. When the RUNSTDBY bit is zero, the analog blocks are powered off for the lowest power consumption. This necessitates a start-up time delay when the system returns from Sleep mode.

For Window mode operation, both comparators in a pair must have the same RUNSTDBY configuration.

When the RUNSTDBY bit is one, any enabled AC interrupt source can wake up the CPU. The AC can also be used during sleep modes where the clock used by the AC is disabled, provided that the AC is still powered (not in shutdown). In this case, the behavior is slightly different and depends on the measurement mode, as listed in the following table.

Table 38-2. Sleep Mode Operation
COMPCTRLn.MODE RUNSTDBY = 0 RUNSTDBY = 1
0 (Continuous) COMPx disabled GCLK_AC stopped, COMPx enabled
1 (Single-shot) COMPx disabled GCLK_AC stopped, COMPx enabled only when triggered by an input event