Merge branch 'feature/esp32c5beta3_light_sleep_support_stage_1' into 'master'

feat(esp_hw_support): esp32c5 sleep support (Stage 2: support basic pmu sleep function)

See merge request espressif/esp-idf!29549
This commit is contained in:
Wu Zheng Hui
2024-04-11 10:38:17 +08:00
36 changed files with 1286 additions and 198 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
@@ -15,6 +15,10 @@
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32H2 \
|| CONFIG_IDF_TARGET_ESP32C6
#define BOOT_BUTTON_NUM 9
#elif CONFIG_IDF_TARGET_ESP32C5_MP_VERSION
#define BOOT_BUTTON_NUM 28
#elif CONFIG_IDF_TARGET_ESP32C5_BETA3_VERSION
#define BOOT_BUTTON_NUM 7
#elif CONFIG_IDF_TARGET_ESP32P4
#define BOOT_BUTTON_NUM 35
#else

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
@@ -46,7 +46,7 @@ static void light_sleep_task(void *args)
break;
case ESP_SLEEP_WAKEUP_UART:
wakeup_reason = "uart";
/* Hang-up for a while to switch and execuse the uart task
/* Hang-up for a while to switch and execute the uart task
* Otherwise the chip may fall sleep again before running uart task */
vTaskDelay(1);
break;
@@ -68,7 +68,7 @@ static void light_sleep_task(void *args)
wakeup_reason, t_after_us / 1000, (t_after_us - t_before_us) / 1000);
#endif
if (esp_sleep_get_wakeup_cause() == ESP_SLEEP_WAKEUP_GPIO) {
/* Waiting for the gpio inactive, or the chip will continously trigger wakeup*/
/* Waiting for the gpio inactive, or the chip will continuously trigger wakeup*/
example_wait_gpio_inactive();
}
}