2017-01-27 11:00:31 -05:00
|
|
|
menu "Example Configuration"
|
|
|
|
|
2020-04-22 10:46:23 -04:00
|
|
|
config EXAMPLE_TOUCH_WAKEUP
|
2019-01-25 11:10:53 -05:00
|
|
|
bool "Enable touch wake up"
|
|
|
|
default y
|
2022-06-07 14:20:56 -04:00
|
|
|
depends on SOC_PM_SUPPORT_TOUCH_SENSOR_WAKEUP
|
2019-01-25 11:10:53 -05:00
|
|
|
help
|
2022-10-27 03:00:02 -04:00
|
|
|
This option enables wake up from deep sleep using touch pads.
|
|
|
|
ESP32 - TOUCH8 and TOUCH9, which correspond to GPIO33 and GPIO32.
|
|
|
|
ESP32S2/S3 - TOUCH9, which corresponds to GPIO9.
|
|
|
|
|
|
|
|
Note: On ESP32, touch wakeup source can not be used together with ext0 wakeup source.
|
2017-01-27 11:00:31 -05:00
|
|
|
|
2022-02-14 13:09:47 -05:00
|
|
|
config EXAMPLE_EXT0_WAKEUP
|
|
|
|
bool "Enable wakeup from GPIO (ext0)"
|
2022-10-27 03:00:02 -04:00
|
|
|
default y if !IDF_TARGET_ESP32
|
|
|
|
default n if IDF_TARGET_ESP32
|
2023-02-17 07:30:51 -05:00
|
|
|
depends on SOC_PM_SUPPORT_EXT0_WAKEUP
|
2022-02-14 13:09:47 -05:00
|
|
|
help
|
2022-10-27 03:00:02 -04:00
|
|
|
This option enables wake up from deep sleep from GPIO25(ESP32)/GPIO3(ESP32S2,S3). The pin should be
|
|
|
|
connected to LOW to avoid being in a floating state. When triggering a wake up, connect the pin to HIGH.
|
|
|
|
Note that floating pins may trigger a wake up.
|
|
|
|
|
|
|
|
Note: On ESP32, ext0 wakeup source can not be used together with touch wakeup source.
|
2022-02-14 13:09:47 -05:00
|
|
|
|
2020-04-22 10:46:23 -04:00
|
|
|
config EXAMPLE_EXT1_WAKEUP
|
2022-02-14 13:09:47 -05:00
|
|
|
bool "Enable wakeup from GPIO (ext1)"
|
2020-04-22 10:46:23 -04:00
|
|
|
default y
|
2023-02-17 07:30:51 -05:00
|
|
|
depends on SOC_PM_SUPPORT_EXT1_WAKEUP
|
2020-04-22 10:46:23 -04:00
|
|
|
help
|
|
|
|
This option enables wake up from deep sleep from GPIO2 and GPIO4. They should be connected to LOW to avoid
|
|
|
|
floating pins. When triggering a wake up, connect one or both of the pins to HIGH. Note that floating
|
|
|
|
pins may trigger a wake up.
|
|
|
|
|
2023-07-13 02:19:48 -04:00
|
|
|
menu "EXT1 wakeup configuration"
|
|
|
|
visible if EXAMPLE_EXT1_WAKEUP
|
|
|
|
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1
|
|
|
|
int "Enable wakeup from PIN_1"
|
|
|
|
depends on !IDF_TARGET_ESP32
|
|
|
|
default 2 if !IDF_TARGET_ESP32H2
|
|
|
|
default 10 if IDF_TARGET_ESP32H2
|
|
|
|
range 0 7 if IDF_TARGET_ESP32C6
|
|
|
|
range 7 14 if IDF_TARGET_ESP32H2
|
|
|
|
range 0 21 if IDF_TARGET_ESP32S2
|
|
|
|
range 0 21 if IDF_TARGET_ESP32S3
|
2024-06-27 04:19:15 -04:00
|
|
|
range 0 15 if IDF_TARGET_ESP32P4
|
2023-07-13 02:19:48 -04:00
|
|
|
|
|
|
|
choice EXAMPLE_EXT1_WAKEUP_PIN_1_SEL
|
|
|
|
prompt "Enable wakeup from PIN_1"
|
|
|
|
default EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_2
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_0
|
|
|
|
bool "GPIO 0"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_2
|
|
|
|
bool "GPIO 2"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_4
|
|
|
|
bool "GPIO 4"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_12
|
|
|
|
bool "GPIO 12"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_13
|
|
|
|
bool "GPIO 13"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_14
|
|
|
|
bool "GPIO 14"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_15
|
|
|
|
bool "GPIO 15"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_25
|
|
|
|
bool "GPIO 25"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_26
|
|
|
|
bool "GPIO 26"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_27
|
|
|
|
bool "GPIO 27"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_32
|
|
|
|
bool "GPIO 32"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_33
|
|
|
|
bool "GPIO 33"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_34
|
|
|
|
bool "GPIO 34"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_35
|
|
|
|
bool "GPIO 35"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_36
|
|
|
|
bool "GPIO 36"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_37
|
|
|
|
bool "GPIO 37"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_38
|
|
|
|
bool "GPIO 38"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_39
|
|
|
|
bool "GPIO 39"
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_1
|
|
|
|
int
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
default 0 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_0
|
|
|
|
default 2 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_2
|
|
|
|
default 4 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_4
|
|
|
|
default 12 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_12
|
|
|
|
default 13 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_13
|
|
|
|
default 14 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_14
|
|
|
|
default 15 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_15
|
|
|
|
default 25 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_25
|
|
|
|
default 26 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_26
|
|
|
|
default 27 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_27
|
|
|
|
default 32 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_32
|
|
|
|
default 33 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_33
|
|
|
|
default 34 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_34
|
|
|
|
default 35 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_35
|
|
|
|
default 36 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_36
|
|
|
|
default 37 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_37
|
|
|
|
default 38 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_38
|
|
|
|
default 39 if EXAMPLE_EXT1_WAKEUP_PIN_1_SEL_39
|
|
|
|
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2
|
|
|
|
int "Enable wakeup from PIN_2"
|
|
|
|
depends on !IDF_TARGET_ESP32
|
|
|
|
default 4 if !IDF_TARGET_ESP32H2
|
|
|
|
default 11 if IDF_TARGET_ESP32H2
|
|
|
|
range 0 7 if IDF_TARGET_ESP32C6
|
|
|
|
range 7 14 if IDF_TARGET_ESP32H2
|
|
|
|
range 0 21 if IDF_TARGET_ESP32S2
|
|
|
|
range 0 21 if IDF_TARGET_ESP32S3
|
2024-06-27 04:19:15 -04:00
|
|
|
range 0 15 if IDF_TARGET_ESP32P4
|
2023-07-13 02:19:48 -04:00
|
|
|
|
|
|
|
choice EXAMPLE_EXT1_WAKEUP_PIN_2_SEL
|
|
|
|
prompt "Enable wakeup from PIN_2"
|
|
|
|
default EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_4
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_0
|
|
|
|
bool "GPIO 0"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_2
|
|
|
|
bool "GPIO 2"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_4
|
|
|
|
bool "GPIO 4"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_12
|
|
|
|
bool "GPIO 12"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_13
|
|
|
|
bool "GPIO 13"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_14
|
|
|
|
bool "GPIO 14"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_15
|
|
|
|
bool "GPIO 15"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_25
|
|
|
|
bool "GPIO 25"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_26
|
|
|
|
bool "GPIO 26"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_27
|
|
|
|
bool "GPIO 27"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_32
|
|
|
|
bool "GPIO 32"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_33
|
|
|
|
bool "GPIO 33"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_34
|
|
|
|
bool "GPIO 34"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_35
|
|
|
|
bool "GPIO 35"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_36
|
|
|
|
bool "GPIO 36"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_37
|
|
|
|
bool "GPIO 37"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_38
|
|
|
|
bool "GPIO 38"
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_39
|
|
|
|
bool "GPIO 39"
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_PIN_2
|
|
|
|
int
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
default 0 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_0
|
|
|
|
default 2 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_2
|
|
|
|
default 4 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_4
|
|
|
|
default 12 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_12
|
|
|
|
default 13 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_13
|
|
|
|
default 14 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_14
|
|
|
|
default 15 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_15
|
|
|
|
default 25 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_25
|
|
|
|
default 26 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_26
|
|
|
|
default 27 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_27
|
|
|
|
default 32 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_32
|
|
|
|
default 33 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_33
|
|
|
|
default 34 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_34
|
|
|
|
default 35 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_35
|
|
|
|
default 36 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_36
|
|
|
|
default 37 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_37
|
|
|
|
default 38 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_38
|
|
|
|
default 39 if EXAMPLE_EXT1_WAKEUP_PIN_2_SEL_39
|
2022-02-14 13:09:47 -05:00
|
|
|
|
2023-07-13 02:19:48 -04:00
|
|
|
choice EXAMPLE_EXT1_WAKEUP_MODE_SEL
|
|
|
|
prompt "Select wakeup mode from EXT1"
|
|
|
|
default ESP_EXT1_WAKEUP_ANY_HIGH
|
2023-07-13 02:06:10 -04:00
|
|
|
depends on !SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN
|
2023-07-13 02:19:48 -04:00
|
|
|
config ESP_EXT1_WAKEUP_ANY_LOW
|
|
|
|
bool "GPIO any low level"
|
|
|
|
depends on !IDF_TARGET_ESP32
|
|
|
|
config ESP_EXT1_WAKEUP_ALL_LOW
|
|
|
|
bool "GPIO all low level"
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
config ESP_EXT1_WAKEUP_ANY_HIGH
|
|
|
|
bool "GPIO any high level"
|
|
|
|
endchoice
|
2022-02-14 13:09:47 -05:00
|
|
|
|
2023-07-13 02:19:48 -04:00
|
|
|
config EXAMPLE_EXT1_WAKEUP_MODE
|
|
|
|
int
|
2023-07-13 02:06:10 -04:00
|
|
|
depends on !SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN
|
2023-07-13 02:19:48 -04:00
|
|
|
default 0 if ESP_EXT1_WAKEUP_ANY_LOW
|
|
|
|
default 0 if ESP_EXT1_WAKEUP_ALL_LOW
|
|
|
|
default 1 if ESP_EXT1_WAKEUP_ANY_HIGH
|
|
|
|
|
2023-07-13 02:06:10 -04:00
|
|
|
choice EXAMPLE_EXT1_WAKEUP_PIN_1_MODE_SEL
|
|
|
|
prompt "Select pin_1 wakeup mode from EXT1"
|
|
|
|
default ESP_EXT1_WAKEUP_PIN_1_HIGH
|
|
|
|
depends on SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN
|
|
|
|
config ESP_EXT1_WAKEUP_PIN_1_LOW
|
|
|
|
bool "GPIO low level"
|
|
|
|
config ESP_EXT1_WAKEUP_PIN_1_HIGH
|
|
|
|
bool "GPIO high level"
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_MODE_PIN_1
|
|
|
|
int
|
|
|
|
depends on SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN
|
|
|
|
default 0 if ESP_EXT1_WAKEUP_PIN_1_LOW
|
|
|
|
default 1 if ESP_EXT1_WAKEUP_PIN_1_HIGH
|
|
|
|
|
|
|
|
choice EXAMPLE_EXT1_WAKEUP_PIN_2_MODE_SEL
|
|
|
|
prompt "Select pin_2 wakeup mode from EXT1"
|
|
|
|
default ESP_EXT1_WAKEUP_PIN_2_HIGH
|
|
|
|
depends on SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN
|
|
|
|
config ESP_EXT1_WAKEUP_PIN_2_LOW
|
|
|
|
bool "GPIO low level"
|
|
|
|
config ESP_EXT1_WAKEUP_PIN_2_HIGH
|
|
|
|
bool "GPIO high level"
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config EXAMPLE_EXT1_WAKEUP_MODE_PIN_2
|
|
|
|
int
|
|
|
|
depends on SOC_PM_SUPPORT_EXT1_WAKEUP_MODE_PER_PIN
|
|
|
|
default 0 if ESP_EXT1_WAKEUP_PIN_2_LOW
|
|
|
|
default 1 if ESP_EXT1_WAKEUP_PIN_2_HIGH
|
|
|
|
|
2023-07-13 02:19:48 -04:00
|
|
|
config EXAMPLE_EXT1_USE_INTERNAL_PULLUPS
|
|
|
|
bool "Use internal pull-up/downs for EXT1 wakeup source"
|
|
|
|
default n
|
|
|
|
depends on EXAMPLE_EXT1_WAKEUP
|
|
|
|
help
|
|
|
|
When using EXT1 wakeup source without external pull-up/downs, you may want to make use of
|
|
|
|
the internal ones.
|
|
|
|
|
2023-07-11 05:15:59 -04:00
|
|
|
if we turn off the RTC_PERIPH domain or if certain chips lack the RTC_PERIPH domain,
|
|
|
|
we will use the HOLD feature to maintain the pull-up and pull-down on the pins during sleep.
|
|
|
|
but if we turn on the RTC_PERIPH domain, we don not need to use HOLD feature and this will
|
2024-06-27 04:19:15 -04:00
|
|
|
increase some power consumption.
|
2023-07-13 02:19:48 -04:00
|
|
|
|
|
|
|
EXT0 wakeup source resides in the same power domain as RTCIO (RTC Periph), so internal
|
|
|
|
pull-up/downs are always available. There's no need to explicitly force it on for EXT0.
|
|
|
|
endmenu
|
2022-02-14 13:09:47 -05:00
|
|
|
|
2021-02-05 04:10:44 -05:00
|
|
|
config EXAMPLE_GPIO_WAKEUP
|
|
|
|
bool "Enable wakeup from GPIO"
|
|
|
|
default y
|
2021-10-26 23:56:56 -04:00
|
|
|
depends on SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
|
2021-02-05 04:10:44 -05:00
|
|
|
help
|
2021-12-30 07:31:38 -05:00
|
|
|
This option enables wake up from GPIO. Be aware that if you use low level to trigger wakeup, we strongly
|
2024-06-27 04:19:15 -04:00
|
|
|
recommend you to connect external pull-up resistance.
|
2021-02-05 04:10:44 -05:00
|
|
|
|
|
|
|
menu "GPIO wakeup configuration"
|
2023-03-02 07:49:14 -05:00
|
|
|
visible if EXAMPLE_GPIO_WAKEUP
|
2021-02-05 04:10:44 -05:00
|
|
|
|
|
|
|
config EXAMPLE_GPIO_WAKEUP_PIN
|
|
|
|
int "Enable wakeup from GPIO"
|
2023-07-03 09:25:56 -04:00
|
|
|
default 0
|
2023-02-18 01:13:52 -05:00
|
|
|
range 0 7 if IDF_TARGET_ESP32C6
|
2024-06-27 04:19:15 -04:00
|
|
|
range 0 15 if IDF_TARGET_ESP32P4
|
2023-07-03 09:25:56 -04:00
|
|
|
range 0 5 if !IDF_TARGET_ESP32C6
|
2021-02-05 04:10:44 -05:00
|
|
|
|
|
|
|
config EXAMPLE_GPIO_WAKEUP_HIGH_LEVEL
|
|
|
|
bool "Enable GPIO high-level wakeup"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
This option set the gpio wake-up trigger signal, In deep sleep, only high or low level wake-up is
|
|
|
|
supported. If this option is enabled, it is a high level wake up, otherwise it is a low level wake up.
|
|
|
|
endmenu
|
|
|
|
|
2020-04-22 10:46:23 -04:00
|
|
|
endmenu
|