🔧 How to Change UART0 to UART1 on Waveshare ESP32-S3 Touch 7B (ESP-IDF Guide)
By default, the Waveshare ESP32-S3 Touch 7B uses UART0 for serial communication (logging and monitoring).
However, in many real-world projects, you may need to:
Free UART0 for USB debugging
Use another UART for external devices (sensors, modules, etc.)
Avoid conflicts with flashing and logs
In this guide, you will learn how to switch from UART0 to UART1 using ESP-IDF.
🧠Understanding UART on ESP32-S3 Touch 7B waveshare
The ESP32-S3 provides multiple UART interfaces:
UART0 → Default (used for flashing and logs)
UART1 → Available for custom use
UART2 → Optional (depending on configuration)
👉 UART signals can be routed to different GPIOs, making it very flexible.
⚙️ Step 1: Change Console Output to UART1
before you change UART 0 to UART1 you must change selector to UART selected
Open your project in ESP-IDF and run:
idf.py menuconfig
Navigate to:
Component config → ESP System Settings → Channel for console output
Change:
UART0
To:
UART1
🔌 Step 2: Configure UART1 Pins
Add this code in your main.c:
#include "driver/uart.h"
#define UART_PORT UART_NUM_1
#define TXD_PIN 17
#define RXD_PIN 18
void app_main(void)
{
uart_config_t uart_config = {
.baud_rate = 115200,
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE
};
uart_driver_install(UART_PORT, 1024, 0, 0, NULL, 0);
uart_param_config(UART_PORT, &uart_config);
uart_set_pin(UART_PORT, TXD_PIN, RXD_PIN, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
}🔨 Step 3: Build and Flash
idf.py build
idf.py flash📟 Step 4: Monitor UART1 Output
Since logs are now on UART1:
Use a USB-to-TTL converter
Connect:
TX → RX
RX → TX
Then open a serial monitor (PuTTY, Arduino Serial Monitor, etc.)
⚠️ Important Notes
Avoid GPIO pins used by the LCD (Waveshare display)
Make sure selected pins are free
UART0 is still used during flashing (unless using USB CDC)
🎯 Conclusion
Switching from UART0 to UART1 allows you to:
Separate debugging and communication
Improve system flexibility
Build more advanced ESP32-S3 projects
With ESP-IDF, you have full control over UART configuration.
🚀 Next Topics
ESP32 UART Communication Example
ESP32-S3 USB CDC vs UART
LVGL + UART Data Integration
Read also : 🚀 Getting Started ESP-IDF with PowerShell & Espressif IDE (Beginner Guide)
Gabung dalam percakapan