mirror of
https://github.com/esphome/esphome.git
synced 2026-08-31 10:06:03 +00:00
7f6aa47434fe853ec955d451219f7851e9a91c41
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
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%
