Hi,
I just received two XIAO ESP32C3 and I can not get them to auto-program then reset. Every time I need to program it I have to enter boot-mode. Once programmed it does not reset and run the program, just stays in boot mode till manual reset button is pressed.
I tried reflashing the bootloader as described in the Wiki but made no difference.
As an experiment, I hooked up an AI-thinker ESP32C3 dev-board and wired a broken out USB lead direct to the board power and USB lines (GPIO18 & 19). I left Arduino settings as an XIAO (both are 4Mb flash) and everything worked as expected. It programmed fine and USB serial was also good. If this programs OK, its hard to see why neither of my XIAO’s will do the same.
I have tried Arduino 1.8.19 and 2.04 and Platform-IO.
All platforms can program the ESP32C3 dev board when they think its an XIAO but none of them will program the actual XIAO without it being manually put in bootloader mode.
Does anyone have any ideas how to get the XIAO’s to program/reset correctly?
Thanks…
I tried out XIAO ESP32C3 as well and have the same issue. According to some design documentation that I saw, some USB commands must be sent to trigger the auto-reset:
Automatic Bootloader​​ esptool.py resets ESP32 -C3 automatically by asserting DTR and RTS control lines of the USB to serial converter chip, i.e., FTDI, CP210x, …
Hi Honvi,
Thanks for the info. That may be the case for boards with a USB to serial chip (FTDI, CP210x) but the XIAO ESP32C3 uses the inbuilt native USB port so it is not directly relevant in this case.
Other ESP32C3 boards I have tried program OK using the inbuilt USB port so it seems to indicate some error condition with the XIAO.
Hi,
I have given up on the XIAO. The chip data sheet shows the method, other boards with the same chip can be programmed by the native USB without any problems so since seeed wont actually provide an answer its left for the user to guess. Maybe a bad batch of cheap chips or an error in the board circuit design, who knows… It is just not worth the time to investigate more.
Even adding extra resistors to ensure strapping pins are correct does not help so I changed my design to use ESPC3-12F instead. Native USB programming works perfectly, just as the data sheet shows.
Good luck…
It sucks there’s no response. Seems the hardware is flawed. I guess I will also dump Seeed XIAO junk and look for something reliable, ideally where posts like this get answers.
Hello, I am sorry my parters do not give you feedback, our xiao esp32c3 do not use an external serial chip, we design it use the JTAG which esp32c3 core have, so you need to enter boot mode to flash
I have been using Xia ESP32-C3s for over 9 months using Visual Studio 2022 and VisualMicro plugin. The automatic bootloader worked perfectly during that time.
In November 2023 I bought some more and SOME of them will not program without pressing and holding the boot button when inserting the USB cable. Once programmed, it does not reset and run the program; It just stays in boot mode until the manual reset button is pressed.
Some of the new ones, however, do program automatically. I flashed them all to the latest bootloader just in case but that made no difference.
This random need for human intervention is unacceptable for me since the Xiao ESP32-C3 gets put in an enclosure where I lose easy access to the buttons.
Since some of them work properly, I know you know how to make it work. The question is why do some of them refuse to automatically program? My product design is too far down the path to change products unless I can find one with the same pinout, memory etc.
HI there,
If I may, I have found through Testing It may be the initial Load of code that causes the issue.
I have found “YMMV” that if I Open a Package Plug it into computer ,IT Windows dings & windows recognizes it.
I put it into DFU mode the port then Changes. I reselect this NEW correct com port and Upload my code.
If it NON experimental code that I know works. I loads resets correctly.
If however If I send it code that’s “GARBAGE” , not only will it not reset but may bootloop or not respond UNLESS I press reset and OR put it into DFU mode manually. any subsequent uploads will work after another KNOWN good Code upload while in DFU mode instead of just trying to upload in AUTO.
It Always works after the proper procedure is followed. I feel like it’s the IDE not helping with the whole RE-selecting EACH and EVERY Time or you go wacky. (also extra settings required for , PSRAM, CDC boot etc). PITA IMO.
My. 02
HTJH
GL PJ
I also see some difference if you use the latest BSP or roll back to the 2.11 Esp (works)
I have noticed this. On the units that don’t want to cooperate if I turn on serial monitoring at 460800 then I see this before I program them. Looks like a manufacturing test sequence. I will have to try to find another good one and see if it does this too or if this is a clue.
mode:DIO, clock div:1
load:0x3fcd6100,len:0x438
load:0x403ce000,len:0x918
load:0x403d0000,len:0x24e4
SHA-256 comparison failed:
03:01:23:509 → Calculated: 080c5cb68a075ced55f248b97bca965e3e5bd5da80a64e34e6a1638f89d6f64e
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway…
entry 0x403ce000
03:01:24:845 → WIFI Setup done
WIFI Scanning…
03:01:27:063 → scan done
2WIFI NETworks Found
03:01:27:088 → WIFI TEST is FALT!
03:01:33:310 → BLE TEST IS FALT!
03:01:34:311 → Begin First Test…
03:01:34:403 → 0
0
1
0
First Test finish!
03:01:35:400 → Begin Second Test…
03:01:35:503 → 0
0
1
0
0
0
0
0
GPIO TEST FALT!
03:01:36:700 → 981
ADC TEST FALT!
TEST DONE!
lower the serial baud rate to 19200… the rate is too high for bidirectional communication
once i did this i have very few problems and can upload without pressing boot button
Hi there,
I never run above 9600, Why would I? for serial monitor? I can’t read that FAST!
I let the IDE pick the upload speed. I see that if you have been using your PLIO setup for months with out
that issue , seems it must be something changed for sure.
Also I noticed they (espresif ) had a BSP 2.?? Alpha and a Beta real-quick after that. some of the older Demo’s won’t run with the Alpha , I don’t have a warm fuzzy with Seeed & RISC and Espresif. too iffy, imo
I’ll stay with the Nrf52840’s and hopefully soon a “Super Xiao”
For me they Just work.
HTH
GL PJ
let me clarify, by 19200, i mean the begin serial rate inside the sketch
i agree that i cant read that fast but somewhere i saw someone say that 9600 is actually too slow for some microcontrolers, especially hardware or maybe its software serial, anyway one will theoredically lag the processor and cause intermittant errors
On further digging, I was reminded of an old blast from the past issue that bit me when I worked in a validation lab about 12 years ago. On a hunch I noticed that as I plug units in my port numbers were getting above 9 because I am plugging in so many of these. Windows has caused problems for me in the past when the port number was greater than 9.
I went into the device manager, selected the high-number port that was currently connected, clicked on Port Settings → Advanced, and then clicked on the COM Port Number dropdown and selected a port number below 10. They will say (in use), and it will pop up an error dialog to scare you, but unless there is something actually currently using that port, you can still pick it. After the change, unplug the module and plug it back in. After doing that, suddenly, this ESP32-C3 that would not program without button presses now programs fine. I tried it on the other ones that wouldn’t cooperate, and they work fine now, too.
Windows!!!
Thank you very much for your suggestions. Currently, we have an FAQ section dedicated to XIAO. We will incorporate frequently mentioned solutions into the FAQ for easy reference in the future.
I have run in to this twice in last 2 days, im finding its more reliablle not haveing a program that pumps data out the USB into IDE. make a 1 sec delay if you need this serial output so when you upload it can recognise it as an upload. So after it stop accepting upload but i could see my serila output from my prog, i held boot and pluged in usb at same time, IDE was then able to upload my new program with deays in it, then hit reset buton and reconect
In my case, uploading from VS did not have good results, but directly from Arduino IDE, I had no more problems, I don’t know if it could help you at all.