Merge branch 'docs/add_the_description_of_gpio_wakeup_in_lightsleep_when_pd_top_v5.2' into 'release/v5.2'

docs(pm): add description for gpio_wakeup (backport v5.2)

See merge request espressif/esp-idf!31738
This commit is contained in:
Jiang Jiang Jian 2024-07-01 14:29:09 +08:00
commit 5df41326bc
2 changed files with 36 additions and 4 deletions

View File

@ -304,6 +304,20 @@ RTC peripherals or RTC memories do not need to be powered on during sleep in thi
esp_sleep_pd_config(ESP_PD_DOMAIN_VDDSDIO, ESP_PD_OPTION_ON);
.. only:: SOC_PM_SUPPORT_TOP_PD
.. note::
.. only:: SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
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.
Alternativelyyou 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.
.. only:: not SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
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.
.. only:: not SOC_RTCIO_WAKE_SUPPORTED
GPIO Wakeup
@ -313,11 +327,13 @@ RTC peripherals or RTC memories do not need to be powered on during sleep in thi
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.
.. only:: esp32c6 or esp32h2
.. only:: SOC_PM_SUPPORT_TOP_PD
.. note::
In Light-sleep mode, setting Kconfig option :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP` will invalidate GPIO wakeup.
.. only:: SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
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.
UART Wakeup (Light-sleep Only)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -304,6 +304,20 @@ RTC 控制器中内嵌定时器,可用于在预定义的时间到达后唤醒
esp_sleep_pd_config(ESP_PD_DOMAIN_VDDSDIO, ESP_PD_OPTION_ON);
.. only:: SOC_PM_SUPPORT_TOP_PD
.. note::
.. only:: SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
在 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 为输入模式。
或者, 可以使用直接调用 :cpp:func:`esp_deep_sleep_enable_gpio_wakeup` 用于 GPIO 唤醒,因为此时 digital IO 的电源域已经被关闭,这个情况类似于进入 Deep-sleep。
.. only:: not SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
在 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 为输入模式。
.. only:: not SOC_RTCIO_WAKE_SUPPORTED
GPIO 唤醒
@ -313,11 +327,13 @@ RTC 控制器中内嵌定时器,可用于在预定义的时间到达后唤醒
此外,可将由 VDD3P3_RTC 电源域供电的 IO 用于芯片的 Deep-sleep 唤醒。调用 :cpp:func:`esp_deep_sleep_enable_gpio_wakeup` 函数可以配置相应的唤醒管脚和唤醒触发电平,该函数用于启用相应管脚的 Deep-sleep 唤醒功能。
.. only:: esp32c6 or esp32h2
.. only:: SOC_PM_SUPPORT_TOP_PD
.. note::
在 Light-sleep 模式下,设置 Kconfig 选项 :ref:`CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP` 将使 GPIO 唤醒失效。
.. only:: SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP
在 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。
UART 唤醒(仅适用于 Light-sleep 模式)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^