Open Areeb-Mufti opened 3 months ago
Have you tried pushing the boot button, holding your finger on it, then pressing the reset button and releasing the reset button without releasing the boot? Or something like that? Sometimes I do that and it works again.
Is anything connected to GPIO0?
What happens if you reset it again when it enters download mode? Will it enter download mode again or do an SPI boot?
I have a custom PCB design with no buttons connected to Enable and GPIO0
The enable pin is pulled high via a 10k resistor along with 1uF capacitor
The GPIO0 is left unconnected as it is already pulled high internally
My ESP32S3 is powered through a backup coin cell CR2477
I am continuously monitoring the main power line through ADC and when it drops below a threshold, I switch the controller in deep sleep mode while powered by the backup coin cell.
Sometimes, the main power drops rapidly and the controller does not have enough time to go into deep sleep mode and brownout occurs About 90% of the time when a brownout is triggered, the device boots up as intended i.e. SPI boot mode and starts operating. Rarely the device gets stuck into the download boot mode and this issue is not resolved until reset the ESP32S3 through the enable pin and power cycle the whole thing. If I only power cycle, ESP32S3 continuously boots in download boot mode
From the boot mode, I have checked that the 1st Stage bootloader is detecting GPIO0 as low and going into download boot mode I have tried using a external pullup resistor with no effect
I believe the issue is somewhere in the 1st stage bootloader where it is misreading the GPIO0 state
So far I have been able to replicate this issue in 5 different devices on my side so I believe this is not a manufacturing fault
I believe the issue is somewhere in the 1st stage bootloader where it is misreading the GPIO0 state
The strapping pins are latched by HW and the first stage bootloader simply reads this register (GPIO_STRAPPING
) so there shouldnt be much room for software errors.
I'll take this issue to our digital team and see if they can explain what is happening
similar issue:
and for completeness:
Sometimes, the main power drops rapidly and the controller does not have enough time to go into deep sleep mode and brownout occurs
I had the same issue with our custom controller, but brownout and "sticking" occured in the moment of switching between main power supply and reserve battery. The solution was pretty straightforward, just increase capacitor on EN pin up to 10 uF, so esp32s3 will be in reset state a bit longer
In my opinion, the issue is with the power supply: the CR2477 battery.
No matter what their capacity (200mAh, 1000mAh, ...), these coin batteries have a very low maximum current peak, around 20mAh, you have to check the datasheet of yours. However, on boot the ESP32 series chips, including the S3, are very likely to have a much higher current peak (100~300mAh). As @ESP-Marius said, the strapping pins are latched in hardware, but since the power supply is unstable/not in range, the hardware is not guaranteed to work properly.
Have a try power your S3 with a stable power supply and see if this issue is still here
@Areeb-Mufti Can you please connect the gpio0 and gpio46 pins to an oscilloscope and then reproduce this issue on your Custom Board
and observe the waveforms (levels) of these two pins at the same time.
Answers checklist.
IDF version.
v5.2.2
Espressif SoC revision.
ESP32-S3
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
CMD
Development Kit.
Custom Board
Power Supply used.
External 3.3V
What is the expected behavior?
The device to boot in SPI Boot Mode
What is the actual behavior?
Device boots in Joint Download Boot Mode
Steps to reproduce.
Debug Logs.
More Information.
I have confirmed that the voltage on the GPIO0 is 3.3V during bootup