Lines Matching +full:wakeup +full:- +full:and +full:- +full:sleep
1 .. zephyr:code-sample:: esp32-light-sleep
2 :name: Light Sleep
4 Use light sleep mode on ESP32 to save power while preserving the state of the memory, CPU, and
10 This example illustrates usage of light sleep mode. Unlike deep sleep mode,
11 light sleep preserves the state of the memory, CPU, and peripherals. Execution
13 When the chip exits light sleep mode, execution continues at the point where it
14 was stopped, and :c:func:`esp_light_sleep_start()` function returns.
16 The example enables the following wakeup sources:
27 button, an external button can be connected, along with a 10k pull-up resistor,
28 and a 100nF capacitor to ground for debouncing.
30 Building, Flashing and Running
33 .. zephyr-app-commands::
34 :zephyr-app: samples/boards/espressif/light_sleep
42 -----------------
44 In the scenario below, the button attached to GPIO0 was pressed and held for
45 about 500 ms, after the second wakeup from light sleep. The program has
46 indicated the wakeup reason after each sleep iteration.
48 .. code-block:: console
50 *** Booting Zephyr OS build zephyr-v3.1.0-3667-gb42e2b225ecf ***
52 Entering light sleep
53 Returned from light sleep, reason: timer, t=3344 ms, slept for 2001 ms
54 Entering light sleep
55 Returned from light sleep, reason: timer, t=5354 ms, slept for 2000 ms
56 Entering light sleep
57 Returned from light sleep, reason: pin, t=5885 ms, slept for 521 ms
59 Entering light sleep
60 Returned from light sleep, reason: timer, t=8765 ms, slept for 2000 ms
61 Entering light sleep
62 Returned from light sleep, reason: timer, t=10776 ms, slept for 2001 ms
63 Entering light sleep
70 IDF monitor, but for other tools it might be necessary to set DTR and RTS line
71 state to "disabled" or "de-asserted".