Files
lucky-cat/docs/gpio-map.md
T

3.9 KiB

ESP32-S3 GPIO Map

This document describes the new upper/lower board in schematic/电机-马达方案.pdf (upper board updated 2026-10-19; lower board updated 2026-10-12). Directions are from the MCU's perspective. Firmware GPIO settings are collected under TQ Cat Configuration -> Board Hardware Configuration (GPIO); see firmware usage.

GPIO Table

U11 Module Pin GPIO Net Direction Connection / Function Notes
1 GND GND N/A Ground reference Ground reference
2 3V3 3V3 Power 3.3 V supply rail Power rail
3 EN/RST EN Input Chip enable and reset input Reset and enable
4 GPIO4 BLK Output LCD backlight enable Active high; old RMT output is not started
5 GPIO5 CS Output ST7789P3 SPI chip select Old pulse output is not started
6 GPIO6 DC Output ST7789P3 data/command Do not use old microswitch wiring
7 GPIO7 RES Output ST7789P3 reset Active low
8 GPIO15 SDA Output ST7789P3 SPI MOSI SPI data, not I2C SDA
9 GPIO16 SCL Output ST7789P3 SPI clock SPI clock, not I2C SCL
10 GPIO17 电量检测 Analog input Battery voltage sense Lower-board R6/R11=100 kOhm each, Q5/Q6 switching; upper-board C31 filter
11 GPIO18 充电检测 Input TP4056 CHRG# via Q7 Low-active assumption requires hardware verification
12 GPIO8 充满检测 Input TP4056 STDBY# via Q8 Not consumed by current firmware; no new option added
13 GPIO19 ESP_D_N Bidirectional USB D- Type-C
14 GPIO20 ESP_D_P Bidirectional USB D+ Type-C
15 GPIO3 NC N/A No assigned net Old touch input moved to GPIO13
16 GPIO46 UNASSIGNED N/A No connection assigned Reserved; no signal assigned
17 GPIO9 PA_CTRL Output Audio amplifier enable Not a battery ADC input on this board
18 GPIO10 马达控制 Output Q3 low-side DC rocker-motor control Not consumed by current firmware; external R30 pull-down
19 GPIO11 开关1 Input Turntable calibration switch External 10 kOhm pull-up; active low
20 GPIO12 开关2 Input Slot/fortune input External 10 kOhm pull-up; active low
21 GPIO13 触摸铜箔 Input TTP223 output / PTT Verify actual touch polarity; firmware retains previous active-level setting
22 GPIO14 IN1 Output ULN2003 IN1 Optional Wi-Fi reset must remain disabled on this pin
23 GPIO21 IN2 Output ULN2003 IN2 Stepper phase control
24 GPIO47 IN3 Output ULN2003 IN3 Stepper motor phase control
25 GPIO48 IN4 Output ULN2003 IN4 Stepper phase control
26 GPIO45 NC N/A No assigned net No longer stepper IN1
27 GPIO0 BOOT Input Boot/download switch 10 kOhm pull-up to 3V3
28 GPIO35 UNASSIGNED N/A No connection assigned Reserved; no signal assigned
29 GPIO36 UNASSIGNED N/A No connection assigned Reserved; no signal assigned
30 GPIO37 UNASSIGNED N/A No connection assigned Reserved; no signal assigned
31 GPIO38 I2S_MCLK Output ES8311 MCLK Audio interface
32 GPIO39 I2S_SCLK Output ES8311 SCLK Audio interface
33 GPIO40 I2S_DSDIN Output ES8311 DSDIN Audio interface
34 GPIO41 I2S_LRCK Output ES8311 LRCK Audio interface
35 GPIO42 I2S_ASDOUT Input ES8311 ASDOUT Audio interface
36 RXD0 TX Input UART0 RX Routed to CN5; connector net names reflect the opposite endpoint
37 TXD0 RX Output UART0 TX Routed to CN5; connector net names reflect the opposite endpoint
38 GPIO2 IO2_I2C_SCL Bidirectional ES8311 control interface SCL Audio codec
39 GPIO1 IO1_I2C_SDA Bidirectional ES8311 control interface SDA Audio codec
40 GND GND N/A Ground reference Ground reference
41 GND GND N/A Ground reference Ground reference