mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
soc: added SOC_TOUCH_SENSE_SUPPORTED macro
This commit is contained in:
@@ -156,7 +156,7 @@ conditional_include_dict = {'SOC_BT_SUPPORTED':BT_DOCS,
|
||||
'SOC_PCNT_SUPPORTED':PCNT_DOCS,
|
||||
'SOC_RMT_SUPPORTED':RMT_DOCS,
|
||||
'SOC_DAC_SUPPORTED':DAC_DOCS,
|
||||
'SOC_TOUCH_SENSOR_NUM':TOUCH_SENSOR_DOCS,
|
||||
'SOC_TOUCH_SENSOR_SUPPORTED':TOUCH_SENSOR_DOCS,
|
||||
'SOC_ULP_SUPPORTED':ULP_DOCS,
|
||||
'SOC_RISCV_COPROC_SUPPORTED':RISCV_COPROC_DOCS,
|
||||
'SOC_DIG_SIGN_SUPPORTED':['api-reference/peripherals/ds.rst'],
|
||||
|
||||
@@ -33,7 +33,7 @@ Peripherals API
|
||||
:esp32: secure_element
|
||||
:esp32s2: spi_slave_hd
|
||||
:SOC_TEMP_SENSOR_SUPPORTED: temp_sensor
|
||||
:SOC_TOUCH_SENSOR_NUM: touch_pad
|
||||
:SOC_TOUCH_SENSOR_SUPPORTED: touch_pad
|
||||
:esp32s2: touch_element
|
||||
:SOC_TWAI_SUPPORTED: twai
|
||||
uart
|
||||
|
||||
@@ -181,7 +181,7 @@ So, in theory, it's ok if you only wake up the system after the flash is complet
|
||||
Therefore, it's recommended not to power down flash when using ESP-IDF. For power-sensitive applications, it's recommended to use Kconfig option :ref:`CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND` to reduce the power consumption of the flash during light sleep, instead of powering down the flash.
|
||||
|
||||
.. only:: SOC_SPIRAM_SUPPORTED
|
||||
|
||||
|
||||
It is worth mentioning that PSRAM has a similar Kconfig option :ref:`CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND`.
|
||||
|
||||
However, for those who have fully understood the risk and are still willing to power down the flash to further reduce the power consumption, please check the following mechanisms:
|
||||
@@ -243,7 +243,7 @@ Checking Sleep Wakeup Cause
|
||||
|
||||
:cpp:func:`esp_sleep_get_wakeup_cause` function can be used to check which wakeup source has triggered wakeup from sleep mode.
|
||||
|
||||
.. only:: SOC_TOUCH_SENSOR_NUM
|
||||
.. only:: SOC_TOUCH_SENSOR_SUPPORTED
|
||||
|
||||
For touchpad, it is possible to identify which touch pin has caused wakeup using :cpp:func:`esp_sleep_get_touchpad_wakeup_status` functions.
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
:esp32: secure_element
|
||||
:esp32s2: spi_slave_hd
|
||||
:SOC_TEMP_SENSOR_SUPPORTED: temp_sensor
|
||||
:SOC_TOUCH_SENSOR_NUM: touch_pad
|
||||
:SOC_TOUCH_SENSOR_SUPPORTED: touch_pad
|
||||
:esp32s2: touch_element
|
||||
:SOC_TWAI_SUPPORTED: twai
|
||||
uart
|
||||
|
||||
@@ -67,7 +67,7 @@ RTC 控制器中内嵌定时器,可用于在预定义的时间到达后唤醒
|
||||
RTC IO 模块中包含这样一个逻辑——当发生触摸传感器中断时,触发唤醒。要启用此唤醒源,用户需要在芯片进入睡眠模式前配置触摸传感器中断功能。
|
||||
|
||||
.. only:: esp32
|
||||
|
||||
|
||||
ESP32 修订版 0 和 1 仅在 RTC 外设没有被强制供电时支持该唤醒源(即 ESP_PD_DOMAIN_RTC_PERIPH 应被设置为 ESP_PD_OPTION_AUTO)。
|
||||
|
||||
可调用 :cpp:func:`esp_sleep_enable_touchpad_wakeup` 函数来启用该唤醒源。
|
||||
@@ -78,7 +78,7 @@ RTC 控制器中内嵌定时器,可用于在预定义的时间到达后唤醒
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
RTC IO 模块中包含这样一个逻辑——当某个 RTC GPIO 被设置为预定义的逻辑值时,触发唤醒。RTC IO 是 RTC 外设电源域的一部分,因此如果该唤醒源被请求,RTC 外设将在 Deep-sleep 模式期间保持供电。
|
||||
|
||||
|
||||
在此模式下,RTC IO 模块被使能,因此也可以使用内部上拉或下拉电阻。配置时,应用程序需要在调用函数 :cpp:func:`esp_deep_sleep_start` 前先调用函数 :cpp:func:`rtc_gpio_pullup_en` 和 :cpp:func:`rtc_gpio_pulldown_en`。
|
||||
|
||||
.. only:: esp32
|
||||
@@ -115,7 +115,7 @@ RTC 控制器中内嵌定时器,可用于在预定义的时间到达后唤醒
|
||||
当芯片处于睡眠模式时,ULP 协处理器仍然运行,可用于轮询传感器、监视 ADC 或触摸传感器的值,并在检测到特殊事件时唤醒芯片。ULP 协处理器是 RTC 外设电源域的一部分,运行存储在 RTC 低速内存中的程序。如果这一唤醒源被请求,RTC 低速内存将会在睡眠期间保持供电状态。RTC 外设会在 ULP 协处理器开始运行程序前自动上电;一旦程序停止运行,RTC 外设会再次自动断电。
|
||||
|
||||
.. only:: esp32
|
||||
|
||||
|
||||
ESP32 修订版 0 和 1 仅在 RTC 外设没有被强制供电时支持该唤醒(即 ESP_PD_DOMAIN_RTC_PERIPH 应被设置为 ESP_PD_OPTION_AUTO)。
|
||||
|
||||
可调用 :cpp:func:`esp_sleep_enable_ulp_wakeup` 函数来启用此唤醒源。
|
||||
@@ -179,7 +179,7 @@ Flash 断电
|
||||
因为这些不可控的因素,ESP-IDF 很难保证 flash断电的绝对安全。因此 ESP-IDF 不推荐用户断电 flash。对于一些功耗敏感型应用,可以通过设置 Kconfig 配置项 :ref:`CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND` 来减少 light sleep 期间 flash 的功耗。这种方式在几乎所有场景下都要比断电 flash 更好,兼顾了安全性和功耗。
|
||||
|
||||
.. only:: SOC_SPIRAM_SUPPORTED
|
||||
|
||||
|
||||
值得一提的是,PSRAM 也有一个类似的 Kconfig 配置项 :ref:`CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND`。
|
||||
|
||||
考虑到有些用户能够充分评估断电 flash 的风险,并希望通过断电 flash 来获得更低的功耗,因此 ESP-IDF 提供了两种断电 flash 的机制:
|
||||
@@ -224,7 +224,7 @@ Flash 断电
|
||||
.. only:: esp32c3
|
||||
|
||||
在 Deep-sleep 模式中:
|
||||
- 数字 GPIO (GPIO6 ~ 21) 处于高阻态。
|
||||
- 数字 GPIO (GPIO6 ~ 21) 处于高阻态。
|
||||
- RTC GPIO (GPIO0 ~ 5) 可能处于以下状态:
|
||||
- 如果未启用保持 (hold) 功能,RTC GPIO 将处于高阻态。
|
||||
- 如果启用保持功能,RTC GPIO 管脚将会在保持功能开启时处于锁存状态。
|
||||
@@ -241,7 +241,7 @@ UART 输出处理
|
||||
|
||||
:cpp:func:`esp_sleep_get_wakeup_cause` 函数可用于检测是何种唤醒源在睡眠期间被触发。
|
||||
|
||||
.. only:: SOC_TOUCH_SENSOR_NUM
|
||||
.. only:: SOC_TOUCH_SENSOR_SUPPORTED
|
||||
|
||||
对于触摸传感器唤醒源,可以调用函数 :cpp:func:`esp_sleep_get_touchpad_wakeup_status` 来确认触发唤醒的触摸管脚。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user