The ESP32-C3 supports two ways to download the firmware:
UART0
andUSB
.
- The
BootMode
forESP32-C3
as follows:
This order of the4 bits
can be summarized as follows:
1 Download the firmware using the UART
pins
- Please refer to " The hardware conditions for the ESP32-C3 chip to enter the " Download Mode" " introductions.
- Please refer to the 《ESP32-C3 Datasheet》 about " Srtapping Pins " instructions.
2 Download the firmware using the USB
pins
-
The ESP32-C3 chip has a built-in USB Serial/JTAG Controller, which supports use
USB pins
todownload firmware
、print the log
, andJTAG debugging
. -
The ESP32-C3 has no built-in
USB-OTG
(USB Host and USB Device are not supported), it does not support the secondary development of universal USB applications.
-
For the hardware requirements for use
USB pins
todownload firmware
, please refer to the " USB Serial/JTAG Controller Console " guide. -
ESP32-C3 only supports
USB CDC
download mode. -
Connect ESP32-C3 to the USB port as follows:
-
The USB hardware schematic diagram as follows:
-
Based on the ESP-IDF software compilation environment, you need to set the following configs when downloading firmware using the USB pins:
Note: USB download mode is only supported on
ESP-IDF v4.4 or later
version.
menuconfig → Component config → ESP System Settings → Channel for console output → USB Serial/JTAG Controller
-
To query USB ports on Ubuntu environment:
ll /dev/ttyACM*
-
The ESP32-C3 uses
USB CDC
mode to download firmware commandidf.py -p /dev/ttyACM* flash monitor
3 【Introductions】
-
When you using the
USB
pins to download firmware , you can also using theUSB
pins toprint program running logs
. -
Under the "
SPI_DOWNLOAD_BOOT
" and "UART0_BOOT
" modes, it is not supported use USB pins to download firmware. -
Both download modes are supported when the
hardware conditions
for downloading firmware usingUART
pins and downloading firmware usingUSB
pins are met at the same time. -
But the
idf.py flash
command will default use the UART download mode. In USB download mode, you need to specify the USB port number and run theidf.py -p /dev/ttyACM0 flash
command to download firmware. -
If your computer environment does not recognize ESP32-C3 devices, please refer to the " Establish Serial Connection with ESP32-C3 " guide .