Hardware Connection

[中文]

This document introduces what hardware you need to prepare and how to connect them in order to download AT firmware, send AT commands, and receive AT responses.

For different series of modules, the commands supported by AT firmware are different. Please refer to ESP-AT Firmware Differences for more details.

What You Need

List of Components Required for ESP-AT Testing

Component

Function

ESP32-C2 board

Slave MCU.

USB cable (ESP32-C2 borad to PC)

Download/Log output connection.

PC

Act as Host MCU. Download firmware to Slave MCU.

USB cable (PC to serial port converter)

AT command/response connection.

USB to serial port converter

Convert between USB signals and TTL signals.

Jumper wires (serial port converter to ESP32-C2 board)

AT command/response connection.

Connection of Components for ESP-AT Testing

Connection of Components for ESP-AT Testing

Note:

  • The official default AT Binary Lists only supports 26 MHz crystal oscillator. If your crystal oscillator of ESP32-C2 is 40 MHz, please refer to Compile ESP-AT Project Locally document to compile ESP32-C2 AT firmware, and configurate in the step 5:

    python build.py menuconfig -> Component config -> Hardware Settings -> Main XTAL Config -> Main XTAL frequency -> 40 MHz
    
  • In the above picture, four jump wires are used to connect the ESP32-C2 board and USB to serial converter. If you do not use hardware flow control, two wires connecting TX/RX and a simpler converter will be enough.

  • If you use an ESP32-C2 module instead of a development board and flash firmware via UART, you need to reserve the UART pins (refer to # > Section Pin Description for more details) and one of the following conditions needs to be met:

    • Reserve the Strapping pins (refer to # > Section Strapping Pins for more details), and enter the download mode by controlling the Strapping pin level.

    • Enter the download mode by sending AT+RST=1,1 command.

ESP32C2-4MB Series

ESP32C2-4MB series refer to the module or board that has a built-in ESP32-C2/ESP8684 chip with a 4 MB flash, such as ESP32C2-MINI series device and ESP32C2-WROOM series device.

ESP32C2-4MB AT uses two UART ports: UART0 is used to download firmware and log output; UART1 is used to send AT commands and receive AT responses. Both UART0 and UART1 use 115200 baud rate for communication by default.

ESP32C2-4MB Series Hardware Connection Pinout

Function of Connection

ESP32C2-4MB Board Pins

Other Device Pins

Download/Log output 1

UART0
  • GPIO19 (RX)

  • GPIO20 (TX)

PC
  • TX

  • RX

AT command/response 2

UART1
  • GPIO6 (RX)

  • GPIO7 (TX)

  • GPIO5 (CTS)

  • GPIO4 (RTS)

USB to serial converter
  • TX

  • RX

  • RTS

  • CTS

Note 1: Connection between individual pins of the ESP32C2-4MB board and the PC is already established internally on the ESP32C2-4MB board. You only need to provide USB cable between the board and PC.

Note 2: Connection between CTS/RTS is optional, depending on whether you want to use hardware flow control.

ESP32C2-4MB Series Hardware Connection

ESP32C2-4MB Series Hardware Connection

If you want to connect your device directly with ESP32C2-4MB module rather than the ESP32C2-4MB board that integrates it, please refer to the corresponding module datasheet for more details.

ESP32C2-2MB Series

ESP32C2-2MB series refers to the module or board that has a built-in ESP32-C2/ESP8684 chip with a 2 MB flash.

ESP32C2-2MB AT uses two UART ports: UART0 is used to download firmware and log output; UART1 is used to send AT commands and receive AT responses. Both UART0 and UART1 use 115200 baud rate for communication by default.

ESP32C2-2MB Series Hardware Connection Pinout

Function of Connection

ESP32C2-2MB Board Pins

Other Device Pins

Download/Log output 1

UART0
  • GPIO19 (RX)

  • GPIO20 (TX)

PC
  • TX

  • RX

AT command/response 2

UART1
  • GPIO6 (RX)

  • GPIO7 (TX)

  • GPIO5 (CTS)

  • GPIO4 (RTS)

USB to serial converter
  • TX

  • RX

  • RTS

  • CTS

Log output

UART0
  • GPIO8 (TX)

USB to serial converter
  • RX

Note 1: Connection between individual pins of the ESP32C2-2MB board and the PC is already established internally on the ESP32C2-2MB board. You only need to provide USB cable between the board and PC.

Note 2: Connection between CTS/RTS is optional, depending on whether you want to use hardware flow control.

ESP32C2-2MB Series Hardware Connection

ESP32C2-2MB Series Hardware Connection

If you want to connect your device directly with ESP32C2-2MB module rather than the ESP32C2-2MB board that integrates it, please refer to the corresponding module datasheet for more details.