Xiao-esp32c6 uarts

Hi there,

So Great Question, very specific :+1: backed with some understanding. Here is what I know and have experience in testing.
some may have other…
The ESP32-C6 has 3 UARTs:

  1. UART0 (Hardware Serial 0)
  • Mapped to USB Serial (Serial)
  • Used for programming and Serial.print() via USB
  • Internally wired through the USB-to-Serial bridge (CH9102) on the Xiao board
  • Do not use for general GPIO TX/RX — it’s virtual over USB
  1. UART1 (Hardware Serial 1)
  • Exposed on GPIO6 (D6 = TX) and GPIO7 (D7 = RX)
  • Use this for hardware serial comms with other devices
  • Mapped as Serial1.begin(baud, SERIAL_8N1, RX, TX); — already defaults to GPIO7/6
  1. LP-UART (Low-Power UART / UART2)
  • Exists on the chip (for deep sleep wake and light tasks)
  • Not exposed by the Arduino BSP by default
  • Might be used internally (like JTAG or boot/debug), but not available out-of-the-box on the Xiao board
  • You’d need ESP-IDF and GPIO re-mapping to access it — not typically accessible via Arduino or in common use

You will find many examples on here of Hardware and software Serial applications “Xiao 2 Serial ports” the general rule of thumb is Use Hardware serial whenever possible, and with Software serial you need to explicitly define or name your pins. NOTE: SOme BSP support the pin macros and some do NOT so use GPIO numbers in place of Logical ones. :+1:
it’s not rocket science but requires some attention to detail to implement well

Answers to Jim’s Questions:

Is one of the normal UARTs associated with the USB serial port?

Yes. UART0 is used for USB serial (uploading and Serial.print()).

Is one of the normal UARTs associated with the XIAO-ESP32C6 TX/D6 and RX/D7 pins?

Yes. UART1 is exposed via D6 (TX) and D7 (RX).

Is the low power UART accessible on the XIAO-ESP32C6 module?

Not directly via Arduino. You’d need ESP-IDF and to re-map it manually. It’s not exposed on any Xiao pin by default and is not used in Arduino sketches unless you go low-level.

HTH
GL :slight_smile: PJ :v:

2 Likes