mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 11:03:11 +00:00
Merge branch 'bugfix/lp_io_clock_control_revert_v6.0' into 'release/v6.0'
fix(gpio): Revert the fix for RTCIO config should be written if LPIO clk exists (v6.0) See merge request espressif/esp-idf!47605
This commit is contained in:
@@ -457,6 +457,9 @@ esp_err_t gpio_config_as_analog(gpio_num_t gpio_num)
|
||||
#if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
|
||||
if (rtc_gpio_is_valid_gpio(gpio_num)) {
|
||||
rtc_gpio_deinit(gpio_num);
|
||||
rtc_gpio_set_direction(gpio_num, RTC_GPIO_MODE_DISABLED);
|
||||
rtc_gpio_pullup_dis(gpio_num);
|
||||
rtc_gpio_pulldown_dis(gpio_num);
|
||||
}
|
||||
#endif
|
||||
return ESP_OK;
|
||||
|
||||
@@ -64,19 +64,12 @@ esp_err_t rtc_gpio_deinit(gpio_num_t gpio_num)
|
||||
{
|
||||
ESP_RETURN_ON_FALSE(rtc_gpio_is_valid_gpio(gpio_num), ESP_ERR_INVALID_ARG, RTCIO_TAG, "RTCIO number error");
|
||||
RTCIO_ENTER_CRITICAL();
|
||||
if (io_mux_is_lp_io_in_use(gpio_num)) {
|
||||
// Select GPIO as Digital GPIO
|
||||
rtcio_hal_function_select(rtc_io_number_get(gpio_num), RTCIO_LL_FUNC_DIGITAL);
|
||||
#if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED
|
||||
// Disable any configuration of the RTC IO that may affect the GPIO behavior
|
||||
rtc_gpio_set_direction(gpio_num, RTC_GPIO_MODE_DISABLED);
|
||||
rtc_gpio_pullup_dis(gpio_num);
|
||||
rtc_gpio_pulldown_dis(gpio_num);
|
||||
// Select GPIO as Digital GPIO
|
||||
rtcio_hal_function_select(rtc_io_number_get(gpio_num), RTCIO_LL_FUNC_DIGITAL);
|
||||
// TODO: IDF-14951 Turning off the lp io clock might affect other lp peripherals. Temporary disabled.
|
||||
#if SOC_LP_IO_CLOCK_IS_INDEPENDENT && !CONFIG_IDF_TARGET_ESP32H4
|
||||
io_mux_force_disable_lp_io_clock(gpio_num);
|
||||
#endif
|
||||
#if SOC_LP_IO_CLOCK_IS_INDEPENDENT
|
||||
io_mux_force_disable_lp_io_clock(gpio_num);
|
||||
#endif
|
||||
}
|
||||
RTCIO_EXIT_CRITICAL();
|
||||
|
||||
return ESP_OK;
|
||||
|
||||
Reference in New Issue
Block a user