docs: Update Get Started for ESP32-S31

This commit is contained in:
luweike
2026-08-13 11:44:10 +08:00
parent 867e4fc2d1
commit 4e96d91543
17 changed files with 115 additions and 55 deletions
@@ -19,8 +19,8 @@ Generally, ESP chips implement a serial port using UART and can be connected to
Hardware Requirements
=====================
{IDF_TARGET_USB_DP_GPIO:default="Not Updated!",esp32c3="19",esp32s3="20", esp32c6="13", esp32h2="27", esp32p4="25/27", esp32c5="14", esp32c61="13", esp32h4="14", esp32h21="18"}
{IDF_TARGET_USB_DM_GPIO:default="Not Updated!",esp32c3="18",esp32s3="19", esp32c6="12", esp32h2="26", esp32p4="24/26", esp32c5="13", esp32c61="12", esp32h4="13", esp32h21="17"}
{IDF_TARGET_USB_DP_GPIO:default="Not Updated!",esp32c3="19",esp32s3="20", esp32c6="13", esp32h2="27", esp32p4="25/27", esp32c5="14", esp32c61="13", esp32h4="14", esp32h21="18", esp32s31="34"}
{IDF_TARGET_USB_DM_GPIO:default="Not Updated!",esp32c3="18",esp32s3="19", esp32c6="12", esp32h2="26", esp32p4="24/26", esp32c5="13", esp32c61="12", esp32h4="13", esp32h21="17", esp32s31="33"}
Connect {IDF_TARGET_NAME} to the USB port as follows:
@@ -69,12 +69,10 @@ The USB Serial/JTAG Controller is able to put the {IDF_TARGET_NAME} into downloa
Limitations
===========
{IDF_TARGET_BOOT_PIN:default = "Not Updated!", esp32c3 = "GPIO9", esp32s3 = "GPIO0", esp32c6 = "GPIO9"}
{IDF_TARGET_BOOT_PIN:default = "Not Updated!", esp32c3 = "GPIO9", esp32s3 = "GPIO0", esp32c6 = "GPIO9", esp32s31 = "GPIO61"}
There are several limitations to the USB Serial/JTAG console feature. The significance of these limitations depends on the type of application being developed, and the development workflow.
{IDF_TARGET_BOOT_PIN:default = "Not Updated!", esp32c3 = "GPIO9", esp32s3 = "GPIO0", esp32c6 = "GPIO9"}
USB Pin Reconfiguration
-----------------------
+17 -11
View File
@@ -3,28 +3,34 @@
.. code-block:: none
...
esptool --chip esp32s31 -p /dev/ttyUSB0 -b 460800 --before=default-reset --after=hard-reset write-flash --flash-mode dio --flash-freq 80m --flash-size 2MB 0x0 bootloader/bootloader.bin 0x8000 partition_table/partition-table.bin 0x10000 hello_world.bin
esptool v5.0.2
esptool --chip esp32s31 -p /dev/ttyUSB0 -b 460800 --before=default-reset --after=hard-reset --no-stub write-flash --flash-mode dio --flash-freq 80m --flash-size 2MB 0x2000 bootloader/bootloader.bin 0x8000 partition_table/partition-table.bin 0x10000 hello_world.bin
esptool v5.3.1
Connected to ESP32-S31 on /dev/ttyUSB0:
Chip type: ESP32-S31 (revision v0.0)
Features: Wi-Fi, BT 5 (LE), IEEE802.15.4, Dual Core, 240MHz, Embedded PSRAM
Features: Wi-Fi 6, BT 5.4 (LE), IEEE802.15.4, Dual Core + LP Core, 300MHz
Crystal frequency: 40MHz
MAC: f4:12:fa:87:c6:dc
MAC: 30:ed:a0:f3:dc:70
Stub flasher running.
Changing baud rate to 460800...
Changed.
Enabling default SPI flash mode...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00010000 to 0x00037fff...
Writing 'bootloader/bootloader.bin' at 0x00002000...
SHA digest in image updated.
Wrote 21280 bytes (13578 compressed) at 0x00000000 in 0.6 seconds (298.1 kbit/s).
Flash will be erased from 0x00002000 to 0x00007fff...
Wrote 21392 bytes at 0x00002000 in 0.9 seconds (193.6 kbit/s).
Hash of data verified.
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (315.1 kbit/s).
Writing 'partition_table/partition-table.bin' at 0x00008000...
Flash will be erased from 0x00008000 to 0x00008fff...
Wrote 3072 bytes at 0x00008000 in 0.1 seconds (192.1 kbit/s).
Hash of data verified.
Wrote 161744 bytes (90141 compressed) at 0x00010000 in 2.5 seconds (513.7 kbit/s).
Writing 'hello_world.bin' at 0x00010000...
Flash will be erased from 0x00010000 to 0x00034fff...
Wrote 149968 bytes at 0x00010000 in 6.3 seconds (191.7 kbit/s).
Hash of data verified.
Hard resetting via RTS pin...
@@ -141,8 +141,8 @@ Sometimes the USB-to-UART bridge is external. This is often used in small develo
For the {IDF_TARGET_NAME}, the USB peripheral is available, allowing you to flash the binaries without the need for an external USB-to-UART bridge.
{IDF_TARGET_USB_PIN_DM:default="Not Updated!", esp32c3="GPIO18", esp32s3="GPIO19", esp32s2="GPIO19", esp32c6="GPIO12", esp32h2="GPIO26", esp32p4="GPIO24/26", esp32c5="GPIO13", esp32c61="GPIO28"}
{IDF_TARGET_USB_PIN_DP:default="Not Updated!", esp32c3="GPIO19", esp32s3="GPIO20", esp32s2="GPIO20", esp32c6="GPIO13", esp32h2="GPIO27", esp32p4="GPIO25/27", esp32c5="GPIO14", esp32c61="GPIO29"}
{IDF_TARGET_USB_PIN_DM:default="Not Updated!", esp32c3="GPIO18", esp32s3="GPIO19", esp32s2="GPIO19", esp32c6="GPIO12", esp32h2="GPIO26", esp32p4="GPIO24/26", esp32c5="GPIO13", esp32c61="GPIO28", esp32s31="GPIO33"}
{IDF_TARGET_USB_PIN_DP:default="Not Updated!", esp32c3="GPIO19", esp32s3="GPIO20", esp32s2="GPIO20", esp32c6="GPIO13", esp32h2="GPIO27", esp32p4="GPIO25/27", esp32c5="GPIO14", esp32c61="GPIO29", esp32s31="GPIO34"}
The USB on the {IDF_TARGET_NAME} uses the **{IDF_TARGET_USB_PIN_DP}** for **D+** and **{IDF_TARGET_USB_PIN_DM}** for **D-**.
@@ -349,7 +349,7 @@ If there is no log output, check
Example Output
^^^^^^^^^^^^^^
{IDF_TARGET_STRAP_GPIO:default="[NEEDS TO BE UPDATED]", esp32="GPIO0", esp32s2="GPIO0", esp32s3="GPIO0", esp32c2="GPIO9", esp32c3="GPIO9", esp32c6="GPIO9", esp32h2="GPIO9", esp32p4="GPIO35", esp32c5="GPIO28", esp32c61="GPIO9"}
{IDF_TARGET_STRAP_GPIO:default="[NEEDS TO BE UPDATED]", esp32="GPIO0", esp32s2="GPIO0", esp32s3="GPIO0", esp32c2="GPIO9", esp32c3="GPIO9", esp32c6="GPIO9", esp32h2="GPIO9", esp32p4="GPIO35", esp32c5="GPIO28", esp32c61="GPIO9", esp32s31="GPIO61"}
An example log is shown below. Reset the board if you do not see anything.
@@ -6,7 +6,7 @@ Flashing Troubleshooting
Failed to Connect
-----------------
{IDF_TARGET_STRAP_GPIO:default="[NEEDS TO BE UPDATED]", esp32="GPIO0", esp32s2="GPIO0", esp32s3="GPIO0", esp32c2="GPIO9", esp32c3="GPIO9", esp32c6="GPIO9", esp32h2="GPIO9", esp32p4="GPIO35", esp32c5="GPIO28", esp32c61="GPIO9"}
{IDF_TARGET_STRAP_GPIO:default="[NEEDS TO BE UPDATED]", esp32="GPIO0", esp32s2="GPIO0", esp32s3="GPIO0", esp32c2="GPIO9", esp32c3="GPIO9", esp32c6="GPIO9", esp32h2="GPIO9", esp32p4="GPIO35", esp32c5="GPIO28", esp32c61="GPIO9", esp32s31="GPIO61"}
If you run the given command and see errors such as "Failed to connect", there might be several reasons for this. One of the reasons might be issues encountered by ``esptool``, the utility that is called by the build system to reset the chip, interact with the first stage (ROM) bootloader, and flash firmware. One simple solution to try is to manually reset as described below. If it does not help, you can find more details about possible issues in the `esptool troubleshooting <https://docs.espressif.com/projects/esptool/en/latest/esp32/troubleshooting.html>`_ page.
+21
View File
@@ -43,6 +43,19 @@ Introduction
* USB OTG interface
* USB Serial/JTAG Controller
.. only:: esp32s31
* Wi-Fi 6 (2.4 GHz band)
* Bluetooth® 5.4 (LE)
* Bluetooth® Classic
* 802.15.4 Thread/Zigbee
* High performance dual-core 32-bit RISC-V processor
* Multiple peripherals
* Built-in security hardware
* USB 2.0 High-Speed OTG interface
* USB Serial/JTAG Controller
* Ethernet MAC interface
.. only:: esp32c3
* Wi-Fi (2.4 GHz band)
@@ -169,6 +182,14 @@ If you have one of {IDF_TARGET_NAME} official development boards listed below, y
ESP-VoCat <https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp-vocat/index.html>
ESP-DualKey <https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp-dualkey/index.html>
.. only:: esp32s31
.. toctree::
:maxdepth: 1
ESP32-S31-Function-CoreBoard-1 <https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s31/esp32-s31-function-coreboard-1/index.html>
ESP32-S31-Korvo-1 <https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s31/esp32-s31-korvo-1/index.html>
.. only:: esp32c2
.. toctree::
+2 -2
View File
@@ -1,6 +1,6 @@
{IDF_TARGET_FEATURES:default="[NEEDS TO BE UPDATED]", esp32="WiFi/BT/BLE, silicon revision 1, 2 MB external flash", esp32s2="WiFi, silicon revision 0, 2 MB external flash", esp32s3="This is esp32s3 chip with 2 CPU core(s), WiFi/BLE, silicon revision 0, 2 MB external flash", esp32c2="WiFi/BLE, silicon revision 0, 2 MB embedded flash", esp32c3="WiFi/BLE, silicon revision 0, 2 MB external flash", esp32c6="WiFi/BLE, 802.15.4 (Zigbee/Thread), silicon revision v0.0, 2 MB external flash", esp32h2="BLE, 802.15.4 (Zigbee/Thread), silicon revision v0.1, 2 MB external flash", esp32p4="silicon revision v0.0, 2 MB external flash", esp32c5="WiFi/BLE, 802.15.4 (Zigbee/Thread), silicon revision v1.0, 2 MB external flash", esp32c61="WiFi/BLE, silicon revision v1.0, 2 MB external flash"}
{IDF_TARGET_FEATURES:default="[NEEDS TO BE UPDATED]", esp32="WiFi/BT/BLE, silicon revision 1, 2 MB external flash", esp32s2="WiFi, silicon revision 0, 2 MB external flash", esp32s3="This is esp32s3 chip with 2 CPU core(s), WiFi/BLE, silicon revision 0, 2 MB external flash", esp32c2="WiFi/BLE, silicon revision 0, 2 MB embedded flash", esp32c3="WiFi/BLE, silicon revision 0, 2 MB external flash", esp32c6="WiFi/BLE, 802.15.4 (Zigbee/Thread), silicon revision v0.0, 2 MB external flash", esp32h2="BLE, 802.15.4 (Zigbee/Thread), silicon revision v0.1, 2 MB external flash", esp32p4="silicon revision v0.0, 2 MB external flash", esp32c5="WiFi/BLE, 802.15.4 (Zigbee/Thread), silicon revision v1.0, 2 MB external flash", esp32c61="WiFi/BLE, silicon revision v1.0, 2 MB external flash", esp32s31="WiFi/BT/BLE, 802.15.4 (Zigbee/Thread), silicon revision v0.0, 2 MB external flash"}
{IDF_TARGET_HEAP_SIZE:default="[NEEDS TO BE UPDATED]", esp32="298968", esp32s2="253900", esp32s3="390684", esp32c2="203888", esp32c3="337332", esp32c6="473816", esp32h2="268256", esp32p4="618848", esp32c5="348724", esp32c61="272868"}
{IDF_TARGET_HEAP_SIZE:default="[NEEDS TO BE UPDATED]", esp32="298968", esp32s2="253900", esp32s3="390684", esp32c2="203888", esp32c3="337332", esp32c6="473816", esp32h2="268256", esp32p4="618848", esp32c5="348724", esp32c61="272868", esp32s31="480544"}
Build the Project
=================
+3
View File
@@ -18,6 +18,7 @@ Hardware Reference
:esp32h2: Chip Datasheet (PDF) <https://espressif.com/sites/default/files/documentation/esp32-h2_datasheet_en.pdf>
:esp32c5: Chip Datasheet (PDF) <https://espressif.com/sites/default/files/documentation/esp32-c5_datasheet_en.pdf>
:esp32p4: Chip Datasheet (PDF) <https://espressif.com/sites/default/files/documentation/esp32-p4_datasheet_en.pdf>
:esp32s31: Chip Datasheet (PDF) <https://espressif.com/sites/default/files/documentation/esp32-s31_datasheet_en.pdf>
:esp32: Hardware Design Guidelines <https://docs.espressif.com/projects/esp-hardware-design-guidelines/en/latest/esp32/index.html>
:esp32s2: Hardware Design Guidelines <https://docs.espressif.com/projects/esp-hardware-design-guidelines/en/latest/esp32s2/index.html>
:esp32s3: Hardware Design Guidelines <https://docs.espressif.com/projects/esp-hardware-design-guidelines/en/latest/esp32s3/index.html>
@@ -28,6 +29,7 @@ Hardware Reference
:esp32h2: Hardware Design Guidelines <https://docs.espressif.com/projects/esp-hardware-design-guidelines/en/latest/esp32h2/index.html>
:esp32p4: Hardware Design Guidelines <https://docs.espressif.com/projects/esp-hardware-design-guidelines/en/latest/esp32p4/index.html>
:esp32c5: Hardware Design Guidelines <https://docs.espressif.com/projects/esp-hardware-design-guidelines/en/latest/esp32c5/index.html>
:esp32s31: Hardware Design Guidelines <https://docs.espressif.com/projects/esp-hardware-design-guidelines/en/latest/esp32s31/index.html>
:esp32: SoC Errata <https://docs.espressif.com/projects/esp-chip-errata/en/latest/esp32/index.html>
:esp32s2: SoC Errata <https://docs.espressif.com/projects/esp-chip-errata/en/latest/esp32s2/index.html>
:esp32s3: SoC Errata <https://docs.espressif.com/projects/esp-chip-errata/en/latest/esp32s3/index.html>
@@ -36,6 +38,7 @@ Hardware Reference
:esp32c6: SoC Errata <https://docs.espressif.com/projects/esp-chip-errata/en/latest/esp32c6/index.html>
:esp32c61: SoC Errata <https://docs.espressif.com/projects/esp-chip-errata/en/latest/esp32c61/index.html>
:esp32h2: SoC Errata <https://docs.espressif.com/projects/esp-chip-errata/en/latest/esp32h2/index.html>
:esp32s31: SoC Errata <https://docs.espressif.com/projects/esp-chip-errata/en/latest/esp32s31/index.html>
Chip Variants <https://espressif.com/en/products/socs?id={IDF_TARGET_NAME}>
:not esp32p4: Modules <https://espressif.com/en/products/modules?id={IDF_TARGET_NAME}>
Development Boards <https://www.espressif.com/en/products/devkits?id={IDF_TARGET_NAME}>