From c3c802d9b87eaa9ea058e3fdb180e299328617f4 Mon Sep 17 00:00:00 2001 From: "Michael (XIAO Xufeng)" Date: Wed, 8 Jun 2022 02:20:56 +0800 Subject: [PATCH 1/2] Revert "touch_sensor: forbid from using touch sensor with sleep on ESP32-S3" This reverts commit a84faa3cefc7927918665bf507de4b71f932d403. --- components/driver/esp32s3/touch_sensor.c | 4 ---- components/esp_hw_support/sleep_modes.c | 9 --------- examples/system/deep_sleep/main/Kconfig.projbuild | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/components/driver/esp32s3/touch_sensor.c b/components/driver/esp32s3/touch_sensor.c index 9e0adc3759..c120a1c580 100644 --- a/components/driver/esp32s3/touch_sensor.c +++ b/components/driver/esp32s3/touch_sensor.c @@ -248,10 +248,6 @@ esp_err_t touch_pad_config(touch_pad_t touch_num) esp_err_t touch_pad_init(void) { - //TODO: IDF-4813 - extern bool esp_no_sleep; - esp_no_sleep = true; - if (rtc_touch_mux == NULL) { rtc_touch_mux = xSemaphoreCreateMutex(); } diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index 88d90e2874..c4c2273a01 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -361,17 +361,8 @@ inline static void IRAM_ATTR misc_modules_wake_prepare(void) inline static uint32_t IRAM_ATTR call_rtc_sleep_start(uint32_t reject_triggers, uint32_t lslp_mem_inf_fpu); -//TODO: IDF-4813 -bool esp_no_sleep = false; - static uint32_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags) { -#if CONFIG_IDF_TARGET_ESP32S3 - if (esp_no_sleep) { - ESP_EARLY_LOGE(TAG, "Sleep cannot be used with Touch/ULP for now."); - abort(); - } -#endif //CONFIG_IDF_TARGET_ESP32S3 // Stop UART output so that output is not lost due to APB frequency change. // For light sleep, suspend UART output — it will resume after wakeup. // For deep sleep, wait for the contents of UART FIFO to be sent. diff --git a/examples/system/deep_sleep/main/Kconfig.projbuild b/examples/system/deep_sleep/main/Kconfig.projbuild index ffd64e9bd5..7f412dcc71 100644 --- a/examples/system/deep_sleep/main/Kconfig.projbuild +++ b/examples/system/deep_sleep/main/Kconfig.projbuild @@ -3,7 +3,7 @@ menu "Example Configuration" config EXAMPLE_TOUCH_WAKEUP bool "Enable touch wake up" default y - depends on !IDF_TARGET_ESP32C3 && !IDF_TARGET_ESP32S3 + depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 help This option enables wake up from deep sleep using touch pads TOUCH8 and TOUCH9, which correspond to GPIO33 and GPIO32. From d424b93192bcda73e98ef546ef9dfaf4e739966f Mon Sep 17 00:00:00 2001 From: "Michael (XIAO Xufeng)" Date: Wed, 8 Jun 2022 02:21:44 +0800 Subject: [PATCH 2/2] Revert "touch: add protection for touch sleep case" This reverts commit 974ac3b4b820261b99d16baf0bd4bb009e067736. --- components/driver/test/touch_sensor_test/test_touch_v2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/driver/test/touch_sensor_test/test_touch_v2.c b/components/driver/test/touch_sensor_test/test_touch_v2.c index 3d0f83a353..edb6ccc66f 100644 --- a/components/driver/test/touch_sensor_test/test_touch_v2.c +++ b/components/driver/test/touch_sensor_test/test_touch_v2.c @@ -1977,8 +1977,8 @@ static void test_deep_sleep_init(void) TEST_CASE("Touch Sensor sleep pad wakeup deep sleep test", "[touch][ignore]") { -//TODO: IDF-4813 -#if TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32S3) +//TODO: IDF-5218 +#if TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2) abort(); #endif //TEMPORARY_DISABLED_FOR_TARGETS(..) test_deep_sleep_init();