Flashing ESP32-C3 using built-in usb serial/jtag controller
-
- Posts: 4
- Joined: Tue Nov 16, 2021 8:48 am
Flashing ESP32-C3 using built-in usb serial/jtag controller
Hi,
I'm using Visual Studio Code with the Espressif IDF extension on windows 10.
I have a ESP32-C3-DevKitM-1 which i was able to flash the Get-Started/blink example software using the usb connector on board.
I am now trying to flash it using the built in usb serial/jtag controller.
I have a usb cable connected as below:
Red -> 5V
Black -> GND
Green -> D+ (IO19)
White -> D- (IO18)
I am manually resetting the device into download mode by connecting IO09 to GND and resetting it.
I selected the right COM port and now when i start flashing i get this:
esptool.py v3.1-dev
Serial port COM6
Connecting...
Chip is unknown ESP32-C3 (revision 3)
Features: Wi-Fi
Crystal is 40MHz
MAC: 84:f7:03:09:95:7c
Uploading stub...
Running stub...
And it stays there forever.
If anyone can help me, i would very appreciate it.
Here's what i get when it flashes successfully over the onboard usb:
esptool.py v3.1-dev
Serial port COM3
Connecting....
Chip is unknown ESP32-C3 (revision 3)
Features: Wi-Fi
Crystal is 40MHz
MAC: 84:f7:03:09:95:7c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x00037fff...
Flash will be erased from 0x00000000 to 0x00004fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 160256 bytes to 80218...
Wrote 160256 bytes (80218 compressed) at 0x00010000 in 2.9 seconds (effective 434.9 kbit/s)...
Hash of data verified.
Compressed 19024 bytes to 11330...
Wrote 19024 bytes (11330 compressed) at 0x00000000 in 0.6 seconds (effective 259.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 319.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
I'm using Visual Studio Code with the Espressif IDF extension on windows 10.
I have a ESP32-C3-DevKitM-1 which i was able to flash the Get-Started/blink example software using the usb connector on board.
I am now trying to flash it using the built in usb serial/jtag controller.
I have a usb cable connected as below:
Red -> 5V
Black -> GND
Green -> D+ (IO19)
White -> D- (IO18)
I am manually resetting the device into download mode by connecting IO09 to GND and resetting it.
I selected the right COM port and now when i start flashing i get this:
esptool.py v3.1-dev
Serial port COM6
Connecting...
Chip is unknown ESP32-C3 (revision 3)
Features: Wi-Fi
Crystal is 40MHz
MAC: 84:f7:03:09:95:7c
Uploading stub...
Running stub...
And it stays there forever.
If anyone can help me, i would very appreciate it.
Here's what i get when it flashes successfully over the onboard usb:
esptool.py v3.1-dev
Serial port COM3
Connecting....
Chip is unknown ESP32-C3 (revision 3)
Features: Wi-Fi
Crystal is 40MHz
MAC: 84:f7:03:09:95:7c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x00037fff...
Flash will be erased from 0x00000000 to 0x00004fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 160256 bytes to 80218...
Wrote 160256 bytes (80218 compressed) at 0x00010000 in 2.9 seconds (effective 434.9 kbit/s)...
Hash of data verified.
Compressed 19024 bytes to 11330...
Wrote 19024 bytes (11330 compressed) at 0x00000000 in 0.6 seconds (effective 259.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 319.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
-
- Posts: 9749
- Joined: Thu Nov 26, 2015 4:08 am
Re: Flashing ESP32-C3 using built-in usb serial/jtag controller
What ESP-IDF version are you running?
Re: Flashing ESP32-C3 using built-in usb serial/jtag controller
ESP_Sprite is it possible that cp210x is keeping USB pins in state where USB/JTAG is just not working and it is required to remove resistors on board?
I think that cp210x may keep both lines high and SE1 is invalid USB state.
I think that cp210x may keep both lines high and SE1 is invalid USB state.
Re: Flashing ESP32-C3 using built-in usb serial/jtag controller
I’ve never had any problems leaving the resistors in.
But nothing must be connected to the onboard USB connector while the patch cable is active.
But nothing must be connected to the onboard USB connector while the patch cable is active.
Re: Flashing ESP32-C3 using built-in usb serial/jtag controller
Yes, thats what i mean. If board is power thru onboard usb connector then cp210x may (or may not) cause problems with USB/JTAG connected to pins. It is just idea.
-
- Posts: 4
- Joined: Tue Nov 16, 2021 8:48 am
Re: Flashing ESP32-C3 using built-in usb serial/jtag controller
I am running version 1.2.0
-
- Posts: 4
- Joined: Tue Nov 16, 2021 8:48 am
Re: Flashing ESP32-C3 using built-in usb serial/jtag controller
The onboard resistors connecting the USB pins to the connector are removed by default.
-
- Posts: 9749
- Joined: Thu Nov 26, 2015 4:08 am
Re: Flashing ESP32-C3 using built-in usb serial/jtag controller
I'd say enumeration would likely already fail if it's an actual physical problem... Can you take another look at your esp-idf version? '1.2.0 is super-old and I think that's a version for something else; you're more likely looking for something in the 3.x or 4.x range.
-
- Posts: 4
- Joined: Tue Nov 16, 2021 8:48 am
Re: Flashing ESP32-C3 using built-in usb serial/jtag controller
1.2.0 is the version of the Espressif IDF extension in visual studio code, i can,t seem to find what version of ESP-IDF it is using but it was release on 09/09/2021. Should i try flashing with a different software?ESP_Sprite wrote: ↑Wed Nov 17, 2021 4:06 amI'd say enumeration would likely already fail if it's an actual physical problem... Can you take another look at your esp-idf version? '1.2.0 is super-old and I think that's a version for something else; you're more likely looking for something in the 3.x or 4.x range.
-
- Posts: 9749
- Joined: Thu Nov 26, 2015 4:08 am
Re: Flashing ESP32-C3 using built-in usb serial/jtag controller
It would be useful if you can use the most recent (master) esp-idf as a reference... I'm wondering if you're using some version of esp-idf that comes with an esptool that doesn't quite work with the C3 yet.
Who is online
Users browsing this forum: No registered users and 114 guests