From 38509b2b95dd2a6e12db6c085fac6ab235ef4ea1 Mon Sep 17 00:00:00 2001 From: Konstantin Kondrashov Date: Thu, 16 May 2019 18:46:00 +0800 Subject: [PATCH 1/2] bootloader_support: Fix UART RXD pin for console output (CUSTOM option) The RXD pin is assigned as input (fix for custom uart option). Closes: https://github.com/espressif/esp-idf/issues/2843 Closes: IDFGH-505 --- components/bootloader_support/src/bootloader_init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/bootloader_support/src/bootloader_init.c b/components/bootloader_support/src/bootloader_init.c index 7263c6516..e273d338c 100644 --- a/components/bootloader_support/src/bootloader_init.c +++ b/components/bootloader_support/src/bootloader_init.c @@ -33,12 +33,10 @@ #include "soc/cpu.h" #include "soc/rtc.h" #include "soc/dport_reg.h" -#include "soc/io_mux_reg.h" #include "soc/efuse_reg.h" #include "soc/rtc_cntl_reg.h" #include "soc/timer_group_reg.h" -#include "soc/gpio_reg.h" -#include "soc/gpio_sig_map.h" +#include "soc/gpio_periph.h" #include "soc/rtc_wdt.h" #include "sdkconfig.h" @@ -444,6 +442,10 @@ static void uart_console_configure(void) const uint32_t rx_idx_list[3] = { U0RXD_IN_IDX, U1RXD_IN_IDX, U2RXD_IN_IDX }; const uint32_t tx_idx = tx_idx_list[uart_num]; const uint32_t rx_idx = rx_idx_list[uart_num]; + + PIN_INPUT_ENABLE(GPIO_PIN_MUX_REG[uart_rx_gpio]); + gpio_pad_pullup(uart_rx_gpio); + gpio_matrix_out(uart_tx_gpio, tx_idx, 0, 0); gpio_matrix_in(uart_rx_gpio, rx_idx, 0); } From 33121c3311273bdb13b10771dec6da78103aac22 Mon Sep 17 00:00:00 2001 From: Konstantin Kondrashov Date: Wed, 29 May 2019 13:37:22 +0800 Subject: [PATCH 2/2] soc: Add some headers into gpio_periph.h --- components/soc/include/soc/gpio_periph.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/soc/include/soc/gpio_periph.h b/components/soc/include/soc/gpio_periph.h index 59ccee565..93b23f427 100644 --- a/components/soc/include/soc/gpio_periph.h +++ b/components/soc/include/soc/gpio_periph.h @@ -17,6 +17,10 @@ #include "stdint.h" #include "soc/gpio_pins.h" #include "soc/io_mux_reg.h" +#include "soc/gpio_struct.h" +#include "soc/gpio_reg.h" +#include "soc/gpio_sig_map.h" + #ifdef __cplusplus extern "C" {