ESP32 C3 goes straight to download mode on first power

jenschr
Posts: 7
Joined: Sun Sep 17, 2023 12:40 pm

ESP32 C3 goes straight to download mode on first power

Postby jenschr » Sun Jun 02, 2024 8:53 pm

I have a startup problem with a custom board with an ESP32 C3 Mini 1 module. There are several threads with similar topics here, but they don't solve the problem. This is how the problem manifests itself:

If the board has not been powered for a long while, it'll go straight to dowload mode:

Code: Select all

Build:Feb  7 2021
rst:0x1 (POWERON),boot:0x4 (DOWNLOAD(USB/UART0/1))
waiting for download
In this mode, no code is executed and there is no timeout. The device will just sit there doing nothing. If you then boot or re-apply power, it'll boot normally:

Code: Select all

Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
The problem is that for this but to be reproducable, I have to wait up to 30 minutes. If I don't wait this long, the device will boot as normal from SPI Flash. This is likely due to a capacitor getting discharged or something like that, but I obviously need these devices to always power on and never ever go into this upload mode unless requested to. The error is repeatable as long as I wait for it to "discharge".

I have a 0.1uF on the BOOT pin (GPIO9) but I have no pullup. According to the ESP32 C3 datasheet (3.3 Strapping Pins), the BOOT pin is pulled up internally, so you should not need an external pullup (though it likely does not hurt either):
GPIO9 connected to the chip’s internal weak pull-up resistor at chip reset.
The board is simple:
EN (Pin 8) has a 10k pullup and is connected with a 0.1uF cap to GND
BOOT (GPIO09, pin 23) is connected with a 0.1uF cap to GND
GPIO08 (pin 22) has a 10k pullup and is connected with a 0.1uF cap to GND
The board is powered from 5V USB that drive an AZ1117H-3.3TRG1 that is decoupled with 0.1uF and 10uF.

On the C3, GPIO08 is used as GPIO00 is used on other ESP modules. As opposed to other modules, on the C3 this pin is floating by default. I initially had a 10k Pullup on this pin. Removing the 10k pullup will also produce the problem, but with a different message on startup:

Code: Select all

Build:Feb  7 2021
rst:0x1 (POWERON),boot:0x0 (USB_BOOT)
wait usb download
The boards are to be used in a product that cannot have this problem as it won't be possible to "just boot" the device. Has anybody seen and solved this problem before?

J
Last edited by jenschr on Sun Jun 02, 2024 10:35 pm, edited 1 time in total.

jenschr
Posts: 7
Joined: Sun Sep 17, 2023 12:40 pm

Re: ESP32 C3 goes straight to download mode on first power

Postby jenschr » Sun Jun 02, 2024 10:34 pm

Sigh...
Problem solved. If using the ESP32 C3 - be sure to not have either pullup or capacitor on the BOOT pin (GPIO09). Desoldering the capacitor on that pin made all boards work without error.

Code: Select all

Build:Feb  7 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1

Who is online

Users browsing this forum: No registered users and 384 guests