Help understanding mapping between xiao-esp32c6 module and ESP32-C6FH4 chip

Hi there,

And Welcome Here…

So As shown each PAxx/PBxx label maps to a specific ESP32-C6 GPIO. Developers can use the ESP32-C6’s GPIO numbers or the XIAO’s D/A labels interchangeably in code (the Arduino core variant defines D0–D10 accordingly​sigmdel.ca). The PAxx naming is simply a schematic label – for practical use on the XIAO ESP32C6 board, refer to the GPIO numbers or XIAO D#/A# designators listed.

Complete Pin Mapping and References

For clarity, here’s a summary confirming the mapping from PAxx labels to ESP32-C6 GPIO using official sources:

  • PA02 → GPIO0: XIAO pin D0/A0. (PA02 was Port A pin 02 on SAMD21​wiki.seeedstudio.com, now tied to ESP32-C6 GPIO0​sigmdel.ca.)
  • PA08 → GPIO22: XIAO pin D4 (I2C SDA). (PA08 was Port A pin 08 on SAMD21​wiki.seeedstudio.com, now ESP32-C6 GPIO22 used for SDA).
  • PA09 → GPIO23: XIAO pin D5 (I2C SCL). (Port A pin 09 on SAMD21, now ESP32-C6 GPIO23 for SCL).
  • PA10 → GPIO2: XIAO pin D2/A2. (Port A pin 10 on SAMD21, now ESP32-C6 GPIO2)​wiki.seeedstudio.comsigmdel.ca.
  • PA11 → GPIO21: XIAO pin D3. (Port A pin 11 on SAMD21, now ESP32-C6 GPIO21)​wiki.seeedstudio.com.
  • PA04 → GPIO1: XIAO pin D1/A1. (Port A pin 04 on SAMD21, now ESP32-C6 GPIO1)​wiki.seeedstudio.comsigmdel.ca.
  • PA05 → GPIO20: XIAO pin D9 (SPI MISO). (Port A pin 05 on SAMD21, now ESP32-C6 GPIO20)​wiki.seeedstudio.com.
  • PA06 → GPIO18: XIAO pin D10 (SPI MOSI). (Port A pin 06 on SAMD21, now ESP32-C6 GPIO18)​wiki.seeedstudio.com.
  • PA07 → GPIO19: XIAO pin D8 (SPI SCK). (Port A pin 07 on SAMD21, now ESP32-C6 GPIO19)​wiki.seeedstudio.com.
  • PB08 → GPIO16: XIAO pin D6 (UART TX). (Port B pin 08 on SAMD21, now ESP32-C6 GPIO16)​wiki.seeedstudio.com.
  • PB09 → GPIO17: XIAO pin D7 (UART RX). (Port B pin 09 on SAMD21, now ESP32-C6 GPIO17)​wiki.seeedstudio.com.

The “PAxx” labels (e.g. PA02, PA08) on the XIAO ESP32C6 pinout are a legacy from Seeed’s original XIAO board (which used an ATSAMD21 microcontroller). “PA” denotes Port A on the ATSAMD21 MCU, and the number is the MCU’s pin number on that port. In other words, the XIAO form-factor pins were initially named after the SAMD21’s port pins. For example, the original XIAO had:

These PAxx names appear on the XIAO ESP32C6 schematic/pinout to label the same physical pins, even though the ESP32-C6 chip itself does not have “PA” ports. They are effectively placeholders carried over from the SAMD21 naming convention on the board.

Mapping PAxx to ESP32-C6 GPIO Numbers

On the XIAO ESP32C6, each PAxx-labeled pin is wired to a specific ESP32-C6 GPIO. Below is the mapping between the module’s PA-labels (XIAO pin names) and the actual ESP32-C6 GPIO numbers, along with typical functions:

XIAO Pin Legacy Label ESP32-C6 GPIO Typical Functions
D0 / A0 PA02 GPIO0 ADC1_CH0, GPIO0​docs.espressif.com (available as digital I/O or analog in)
D1 / A1 PA04 GPIO1 ADC1_CH1, GPIO1 (digital/analog)​docs.espressif.com
D2 / A2 PA10 GPIO2 ADC1_CH2, GPIO2 (digital/analog)​docs.espressif.com
D3 PA11 GPIO21 Digital I/O, used as SPI (SDIO_DATA1) on ESP32-C6.
D4 (SDA) PA08 GPIO22 I²C SDA (default), digital I/O (SPI SDIO_DATA2).
D5 (SCL) PA09 GPIO23 I²C SCL (default), digital I/O (SPI SDIO_DATA3).
D6 (TX0) PB08 GPIO16 UART0 TX (U0TXD), digital I/O.
D7 (RX0) PB09 GPIO17 UART0 RX (U0RXD), digital I/O.
D8 (SCK) PA07 GPIO19 SPI SCK (SDIO_CLK), digital I/O.
D9 (MISO) PA05 GPIO20 SPI MISO (SDIO_DATA0), digital I/O.
D10 (MOSI) PA06 GPIO18 SPI MOSI (SDIO_CMD), digital I/O.

The typical functions listed (UART, I²C, SPI, ADC) are how Seeed configured the XIAO ESP32C6 by default: for instance, D6/D7 (which were PB08/PB09 on the SAMD21) are tied to the ESP32-C6’s UART0 for serial TX/RX, and D4/D5 (PA08/PA09) are used as the I²C SDA/SCL lines (ESP32-C6 GPIO22/23). D0–D2 (PA02, PA04, PA10) are connected to ESP32-C6 GPIO0–GPIO2, which support ADC input (channels 0–2) and are labeled A0–A2 for analog use

HTH
GL :slight_smile: PJ :v:

1 Like