Skip to content

Commit e3e5b34

Browse files
committed
Merge branch 'docs/add_the_description_of_gpio_wakeup_in_lightsleep_when_pd_top_v5.3' into 'release/v5.3'
docs(pm): add description for gpio_wakeup (backport v5.3) See merge request espressif/esp-idf!31737
2 parents d431971 + dc9f9bf commit e3e5b34

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

docs/en/api-reference/system/sleep_modes.rst

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,20 @@ RTC peripherals or RTC memories do not need to be powered on during sleep in thi
304304

305305
esp_sleep_pd_config(ESP_PD_DOMAIN_VDDSDIO, ESP_PD_OPTION_ON);
306306

307+
.. only:: SOC_PM_SUPPORT_TOP_PD
308+
309+
.. note::
310+
311+
.. only:: SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
312+
313+
In Light-sleep mode, if you set Kconfig option :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP`, to continue using :cpp:func:`gpio_wakeup_enable` for GPIO wakeup, you need to first call :cpp:func:`rtc_gpio_init` and :cpp:func:`rtc_gpio_set_direction`, setting the RTCIO to input mode.
314+
315+
Alternatively,you can use :cpp:func:`esp_deep_sleep_enable_gpio_wakeup` directly in that condition for GPIO wakeup, because the digital IO power domain is being powered off, where the situation is the same as entering Deep-sleep.
316+
317+
.. only:: not SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
318+
319+
In Light-sleep mode, if you set Kconfig option :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP`, to continue using :cpp:func:`gpio_wakeup_enable` for GPIO wakeup, you need to first call :cpp:func:`rtc_gpio_init` and :cpp:func:`rtc_gpio_set_direction`, setting the RTCIO to input mode.
320+
307321
.. only:: not SOC_RTCIO_WAKE_SUPPORTED
308322

309323
GPIO Wakeup
@@ -313,11 +327,13 @@ RTC peripherals or RTC memories do not need to be powered on during sleep in thi
313327

314328
Additionally, IOs that are powered by the VDD3P3_RTC power domain can be used to wake up the chip from Deep-sleep. The wakeup pin and wakeup trigger level can be configured by calling :cpp:func:`esp_deep_sleep_enable_gpio_wakeup`. The function will enable the Deep-sleep wakeup for the selected pin.
315329

316-
.. only:: esp32c6 or esp32h2
330+
.. only:: SOC_PM_SUPPORT_TOP_PD
317331

318332
.. note::
319333

320-
In Light-sleep mode, setting Kconfig option :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP` will invalidate GPIO wakeup.
334+
.. only:: SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
335+
336+
In Light-sleep mode, if you set Kconfig option :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP`, you can use :cpp:func:`esp_deep_sleep_enable_gpio_wakeup` directly for GPIO wakeup, because the digital IO power domain is being powered off, where the situation is the same as entering Deep-sleep.
321337

322338
UART Wakeup (Light-sleep Only)
323339
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

docs/zh_CN/api-reference/system/sleep_modes.rst

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,20 @@ RTC 控制器中内嵌定时器,可用于在预定义的时间到达后唤醒
304304

305305
esp_sleep_pd_config(ESP_PD_DOMAIN_VDDSDIO, ESP_PD_OPTION_ON);
306306

307+
.. only:: SOC_PM_SUPPORT_TOP_PD
308+
309+
.. note::
310+
311+
.. only:: SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
312+
313+
在 Light-sleep 模式下,如果设置 Kconfig 选项 :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP`,为了继续使用 :cpp:func:`gpio_wakeup_enable` 用于 GPIO 唤醒, 需要先调用 :cpp:func:`rtc_gpio_init` 和 :cpp:func:`rtc_gpio_set_direction`,用于设置 RTC IO 为输入模式。
314+
315+
或者, 可以使用直接调用 :cpp:func:`esp_deep_sleep_enable_gpio_wakeup` 用于 GPIO 唤醒,因为此时 digital IO 的电源域已经被关闭,这个情况类似于进入 Deep-sleep。
316+
317+
.. only:: not SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
318+
319+
在 Light-sleep 模式下,如果设置 Kconfig 选项 :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP`,为了继续使用 :cpp:func:`gpio_wakeup_enable` 用于 GPIO 唤醒, 需要先调用 :cpp:func:`rtc_gpio_init` 和 :cpp:func:`rtc_gpio_set_direction`,用于设置 RTC IO 为输入模式。
320+
307321
.. only:: not SOC_RTCIO_WAKE_SUPPORTED
308322

309323
GPIO 唤醒
@@ -313,11 +327,13 @@ RTC 控制器中内嵌定时器,可用于在预定义的时间到达后唤醒
313327

314328
此外,可将由 VDD3P3_RTC 电源域供电的 IO 用于芯片的 Deep-sleep 唤醒。调用 :cpp:func:`esp_deep_sleep_enable_gpio_wakeup` 函数可以配置相应的唤醒管脚和唤醒触发电平,该函数用于启用相应管脚的 Deep-sleep 唤醒功能。
315329

316-
.. only:: esp32c6 or esp32h2
330+
.. only:: SOC_PM_SUPPORT_TOP_PD
317331

318332
.. note::
319333

320-
在 Light-sleep 模式下,设置 Kconfig 选项 :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP` 将使 GPIO 唤醒失效。
334+
.. only:: SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
335+
336+
在 Light-sleep 模式下,如果设置 Kconfig 选项 :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP`,可以使用直接调用 :cpp:func:`esp_deep_sleep_enable_gpio_wakeup` 用于 GPIO 唤醒,因为此时 digital IO 的电源域已经被关闭,这个情况类似于进入 Deep-sleep。
321337

322338
UART 唤醒(仅适用于 Light-sleep 模式)
323339
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)