Skip to content

Commit 5580383

Browse files
committed
fix(serial_handler): Add RX pull up to avoid floating pin
1 parent df4b4ec commit 5580383

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/serial_handler/serial_handler.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include "serial_handler.h"
1616
#include "esp_log.h"
17+
#include "esp_check.h"
1718
#include "freertos/FreeRTOS.h"
1819
#include "freertos/task.h"
1920
#include "freertos/semphr.h"
@@ -155,6 +156,9 @@ static esp_err_t init_uart_transport(void)
155156
};
156157

157158
if (loader_port_esp32_init(&serial_conf) == ESP_LOADER_SUCCESS) {
159+
// Enable pull up for RXD to avoid floating input
160+
ESP_RETURN_ON_ERROR(gpio_pullup_en(GPIO_RXD), TAG, "Failed to enable pull up for RXD");
161+
158162
ESP_LOGI(TAG, "UART have been initialized");
159163

160164
// Start UART event task

0 commit comments

Comments
 (0)