# Suppor | Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 | ESP32-P4 | ESP32-H2 | | ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- | ## 外围硬件 | 硬件类别 | 组件/型号 | 关键参数/功能 | 备注 | | :----------------- | :--------------- | :--------------------------------- | :------------------------------- | | **核心处理器** | ESP32-S3R8 | Xtensa 32位LX7双核,**主频240MHz** | 乐鑫高性能芯片 | | **存储** | 内置 SRAM | 512KB | 芯片内部 | | | 内置 ROM | 384KB | 芯片内部 | | | 叠封 PSRAM | **8MB** | 用于运行代码,性能优异 | | | 外接 Flash | **16MB** (W25Q128) | 存储程序和数据 | | **显示与触摸** | LCD 屏幕 | 1.9英寸,170×320分辨率,262K彩色 | 驱动IC为ST7789V2 | | | 触摸控制芯片 | **CST816** (电容式) | **触控版特有**,I2C 与 IMU 共用 IO47/IO48 | | **无线通信** | Wi-Fi | 2.4GHz, 802.11 b/g/n | | | | 蓝牙 | Bluetooth 5 (BLE) | | | | 板载天线 | 贴片陶瓷天线 | | | | 外部天线接口 | **IPEX-1 连接器** | **触控版特有**,需修改焊盘启用 | | **传感器** | 六轴惯性测量单元 | **QMI8658A** | 与 CST816 共用 I2C 总线(IO47/IO48) | | **存储扩展** | Micro SD 卡槽 | 支持Micro SD卡 | 位于PCB背面 | | **电源管理** | 电池接口 | MX1.25 连接器 | 支持3.7V锂电池**充放电** | | | USB供电 | USB Type-C 接口 | 同时用于下载调试 | | | 充电指示灯 | 红色LED | 充电时亮起,充满熄灭 | | **用户交互与调试** | 复位按键 | RESET | 系统复位 | | | 启动按键 | BOOT | 用于下载模式和引导 | | **扩展接口** | Pico兼容排针 | 引出丰富GPIO | 兼容树莓派Pico生态,可连接扩展板 | ## 外围接口 | 接口名称 | 接口类型 | 引脚/GPIO | 功能说明 | | :---------------- | :------- | :------------- | :------------------------- | | **LCD 显示屏** | SPI | IO9 | LCD\_RST(复位) | | | | IO10 | LCD\_CLK(时钟) | | | | IO11 | LCD\_DC(数据/命令) | | | | IO12 | LCD\_CS(片选) | | | | IO13 | LCD\_DIN(数据输入) | | | | IO14 | LCD\_BL(背光控制,PWM) | | **触摸屏 / I2C 总线** | I2C | IO47 | TP\_SDA / IMU\_SDA(与 IMU 共用) | | (CST816 + QMI8658) | | IO48 | TP\_SCL / IMU\_SCL(与 IMU 共用) | | | GPIO | IO17 | TP\_RESET(复位) | | | | IO21 | TP\_INT(中断) | | **SD 卡** | SPI | IO5 | SD\_CS(片选) | | | | IO39 | SD\_CLK(时钟) | | | | IO40 | SD\_MISO(主入从出) | | | | IO41 | SD\_MOSI(主出从入) | | **IMU 传感器** | I2C | IO47 | IMU\_SDA(与 TP 共用,见上) | | (QMI8658A) | | IO48 | IMU\_SCL(与 TP 共用,见上) | | | GPIO | IO8 | IMU\_INT1(中断1) | | | | IO7 | IMU\_INT2(中断2) | | **UART0 串口** | UART | IO43 | U0\_TX(发送) | | | | IO44 | U0\_RX(接收) | | **用户按键** | GPIO | IO0 | BOOT0(启动/下载模式) | | | | IO4 | KEY\_IO(用户按键) | | **用户 LED** | GPIO | IO16 | LED\_A(指示灯) | | **电池检测** | ADC | IO3 | BAT\_ADC(电池电压采集) | | **USB Type-C** | USB | VBUS/D+/D- | 供电 + 程序下载 + 串口通信 | | **锂电池接口** | 电源 | J1 | 电池充电与供电(ETA6098) | | **WiFi/蓝牙天线** | 射频 | J5 (U.FL-IPEX) | 外接天线座 | | **TF 卡座** | SPI | TF1 | MicroSD 卡扩展存储 | | **外部 Flash** | SPI | U5 (W25Q32) | 4MB 板载 Flash | | **扩展排针 J3** | 混合 | IO0~IO14 | 20Pin 排针,引出主要 GPIO | | **扩展排针 J4** | 混合 | IO14~IO48等 | 20Pin 排针,含 USB/3V3/地 | ### I2C 设备与固件配置 触控版 PCB 上 **CST816(触摸)** 与 **QMI8658A(IMU)** 挂载在同一条 I2C 总线(`I2C_NUM_0`,SDA=IO47,SCL=IO48)。固件在 `main/bsp/board_config.h` 中定义引脚,触摸与 IMU 驱动共用该总线句柄。 | 设备 | I2C 地址(7-bit) | 说明 | | :------- | :---------------- | :---------------------------- | | CST816S | 由驱动自动探测 | 电容触摸 | | QMI8658A | `0x6A` 或 `0x6B` | 由 SDO 电平决定;本板实测多为 `0x6B` | IMU 中断引脚(IO8 / IO7)当前固件采用轮询采样,Phase 4 可改为中断驱动。 ## Wi-Fi Station Example (See the README.md file in the upper level 'examples' directory for more information about examples.) This example shows how to use the Wi-Fi Station functionality of the Wi-Fi driver of ESP for connecting to an Access Point. ## How to use example ### Configure the project Open the project configuration menu (`idf.py menuconfig`). In the `Example Configuration` menu: * Set the Wi-Fi configuration. * Set `WiFi SSID`. * Set `WiFi Password`. Optional: If you need, change the other options according to your requirements. ### Build and Flash Build the project and flash it to the board, then run the monitor tool to view the serial output: Run `idf.py -p PORT flash monitor` to build, flash and monitor the project. (To exit the serial monitor, type ``Ctrl-]``.) ### Attach USB device in WSL If you are using Windows Subsystem for Linux (WSL) and need to forward the ESP board from Windows to WSL, you can attach the device with: ```bash usbipd attach --wsl --busid 3-1 --auto-attach ``` Replace `3-1` with the actual bus ID of your device from `usbipd list`. This allows the board to be detected by the ESP-IDF tools in WSL. See the Getting Started Guide for all the steps to configure and use the ESP-IDF to build projects. * [ESP-IDF Getting Started Guide on ESP32](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html) * [ESP-IDF Getting Started Guide on ESP32-S2](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html) * [ESP-IDF Getting Started Guide on ESP32-C3](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/get-started/index.html) ## Example Output Note that the output, in particular the order of the output, may vary depending on the environment. Console output if station connects to AP successfully: ```bash I (589) wifi station: ESP_WIFI_MODE_STA I (599) wifi: wifi driver task: 3ffc08b4, prio:23, stack:3584, core=0 I (599) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (599) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (629) wifi: wifi firmware version: 2d94f02 I (629) wifi: config NVS flash: enabled I (629) wifi: config nano formatting: disabled I (629) wifi: Init dynamic tx buffer num: 32 I (629) wifi: Init data frame dynamic rx buffer num: 32 I (639) wifi: Init management frame dynamic rx buffer num: 32 I (639) wifi: Init management short buffer num: 32 I (649) wifi: Init static rx buffer size: 1600 I (649) wifi: Init static rx buffer num: 10 I (659) wifi: Init dynamic rx buffer num: 32 I (759) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 0 I (769) wifi: mode : sta (30:ae:a4:d9:bc:c4) I (769) wifi station: wifi_init_sta finished. I (889) wifi: new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1 I (889) wifi: state: init -> auth (b0) I (899) wifi: state: auth -> assoc (0) I (909) wifi: state: assoc -> run (10) I (939) wifi: connected with #!/bin/test, aid = 1, channel 6, BW20, bssid = ac:9e:17:7e:31:40 I (939) wifi: security type: 3, phy: bgn, rssi: -68 I (949) wifi: pm start, type: 1 I (1029) wifi: AP's beacon interval = 102400 us, DTIM period = 3 I (2089) esp_netif_handlers: sta ip: 192.168.77.89, mask: 255.255.255.0, gw: 192.168.77.1 I (2089) wifi station: got ip:192.168.77.89 I (2089) wifi station: connected to ap SSID:myssid password:mypassword ``` Console output if the station failed to connect to AP: ```bash I (589) wifi station: ESP_WIFI_MODE_STA I (599) wifi: wifi driver task: 3ffc08b4, prio:23, stack:3584, core=0 I (599) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (599) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE I (629) wifi: wifi firmware version: 2d94f02 I (629) wifi: config NVS flash: enabled I (629) wifi: config nano formatting: disabled I (629) wifi: Init dynamic tx buffer num: 32 I (629) wifi: Init data frame dynamic rx buffer num: 32 I (639) wifi: Init management frame dynamic rx buffer num: 32 I (639) wifi: Init management short buffer num: 32 I (649) wifi: Init static rx buffer size: 1600 I (649) wifi: Init static rx buffer num: 10 I (659) wifi: Init dynamic rx buffer num: 32 I (759) phy: phy_version: 4180, cb3948e, Sep 12 2019, 16:39:13, 0, 0 I (759) wifi: mode : sta (30:ae:a4:d9:bc:c4) I (769) wifi station: wifi_init_sta finished. I (889) wifi: new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1 I (889) wifi: state: init -> auth (b0) I (1889) wifi: state: auth -> init (200) I (1889) wifi: new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1 I (1889) wifi station: retry to connect to the AP I (1899) wifi station: connect to the AP fail I (3949) wifi station: retry to connect to the AP I (3949) wifi station: connect to the AP fail I (4069) wifi: new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1 I (4069) wifi: state: init -> auth (b0) I (5069) wifi: state: auth -> init (200) I (5069) wifi: new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1 I (5069) wifi station: retry to connect to the AP I (5069) wifi station: connect to the AP fail I (7129) wifi station: retry to connect to the AP I (7129) wifi station: connect to the AP fail I (7249) wifi: new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1 I (7249) wifi: state: init -> auth (b0) I (8249) wifi: state: auth -> init (200) I (8249) wifi: new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1 I (8249) wifi station: retry to connect to the AP I (8249) wifi station: connect to the AP fail I (10299) wifi station: connect to the AP fail I (10299) wifi station: Failed to connect to SSID:myssid, password:mypassword ``` ## Running the example on ESP Chips without Wi-Fi This example can run on ESP Chips without Wi-Fi using ESP-Hosted. See the [Two-Chip Solution](../../README.md#wi-fi-examples-with-two-chip-solution) section in the upper level `README.md` for information. ## Troubleshooting For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.