J. Nick Koston 7f6aa47434 [uart] Fix UART0 default pin IOMUX loopback on ESP32
Clear residual IOMUX function on UART0 default pins before calling
uart_set_pin(). The ROM bootloader configures these pins via IOMUX
for console output. ESP-IDF's uart_set_pin() has an asymmetry: when
routing TX via GPIO matrix it calls gpio_func_sel(PIN_FUNC_GPIO) to
clear IOMUX, but for RX it only calls gpio_input_enable() which does
NOT clear the IOMUX function select.

If a default UART0 TX pin is later reassigned as RX via GPIO matrix
(common on ESP32-C3 where users swap GPIO20/GPIO21), the old IOMUX TX
function remains active, causing transmitted data to loop back into RX.

This is a targeted fix using gpio_func_sel() which only writes the
IO MUX function register - unlike the previous gpio_reset_pin()
approach which also changed direction, pulls, and drive strength,
breaking external components that rely on default pin state (#11823).

Fixes #14973
Fixes #14612
2026-03-19 09:28:08 -10:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2025-12-21 09:26:03 -05:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-12-08 14:37:45 -05:00
2026-03-12 07:34:53 +13:00
2025-07-17 22:40:28 +12:00
S
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme Multiple Licenses
584 MiB
Languages
C++ 56.2%
Python 43.2%
C 0.3%
JavaScript 0.2%