Chapter 2. API Reference
• strength: Pointer to accept drive capability of the pad
esp_err_t rtc_gpio_hold_en(gpio_num_t
Enable hold function on an RTC IO pad.
Enabling HOLD function will cause the pad to latch current values of input enable, output enable, output value,
function, drive strength values. This function is useful when going into light or deep sleep mode to prevent the
pin configuration from changing.
Return
• ESP_OK Success
• ESP_ERR_INVALID_ARG GPIO is not an RTC IO
Parameters
• gpio_num: GPIO number (e.g. GPIO_NUM_12)
esp_err_t rtc_gpio_hold_dis(gpio_num_t
Disable hold function on an RTC IO pad.
Disabling hold function will allow the pad receive the values of input enable, output enable, output value,
function, drive strength from RTC_IO peripheral.
Return
• ESP_OK Success
• ESP_ERR_INVALID_ARG GPIO is not an RTC IO
Parameters
• gpio_num: GPIO number (e.g. GPIO_NUM_12)
esp_err_t rtc_gpio_isolate(gpio_num_t
Helper function to disconnect internal circuits from an RTC IO This function disables input, output, pullup,
pulldown, and enables hold feature for an RTC IO. Use this function if an RTC IO needs to be disconnected
from internal circuits in deep sleep, to minimize leakage current.
In particular, for ESP32-WROVER module, call rtc_gpio_isolate(GPIO_NUM_12) before entering deep
sleep, to reduce deep sleep current.
Return
• ESP_OK on success
• ESP_ERR_INVALID_ARG if GPIO is not an RTC IO
Parameters
• gpio_num: GPIO number (e.g. GPIO_NUM_12).
esp_err_t
rtc_gpio_force_hold_all(void)
Enable force hold signal for all RTC IOs.
Each RTC pad has a"force hold" input signal from the RTC controller. If this signal is set, pad latches current
values of input enable, function, output enable, and other signals which come from the RTC mux. Force hold
signal is enabled before going into deep sleep for pins which are used for EXT1 wakeup.
esp_err_t
rtc_gpio_force_hold_dis_all(void)
Disable force hold signal for all RTC IOs.
esp_err_t rtc_gpio_wakeup_enable(gpio_num_t
Enable wakeup from sleep mode using specific GPIO.
Return
• ESP_OK on success
• ESP_ERR_INVALID_ARG if gpio_num is not an RTC IO, or intr_type is not one of
GPIO_INTR_HIGH_LEVEL, GPIO_INTR_LOW_LEVEL.
Parameters
• gpio_num: GPIO number
• intr_type:
(GPIO_INTR_LOW_LEVEL)
esp_err_t rtc_gpio_wakeup_disable(gpio_num_t
Disable wakeup from sleep mode using specific GPIO.
Espressif Systems
gpio_num)
gpio_num)
gpio_num)
gpio_num,
Wakeup on high level (GPIO_INTR_HIGH_LEVEL) or low level
gpio_num)
266
Submit Document Feedback
gpio_int_type_t
intr_type)
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?