ESP32S3wroom1 chip flash error

JonasL
Posts: 13
Joined: Mon Nov 28, 2022 4:37 pm

ESP32S3wroom1 chip flash error

Postby JonasL » Mon Nov 28, 2022 6:34 pm

Hello everyone,

I am trying to flash ESP32S3wroom1 chip and I have faced one of the most common errors when dealing with dev boards(in my case no development board is used, just the bare chip). I have connected the following scheme presented in peripheral design guidelines in: https://www.espressif.com/sites/default ... eet_en.pdf (link1)
I am using only 6 pins(3V3,GND,TX,RX,GPIO0,EN). The problem I am facing is that VS code(btw I am using PlatformIO extension, maybe this is the source of the problem) terminal prints the following message during connecting phase:A fatal error occurred: Failed to connect to ESP32-S3: No serial data received.
Maybe the problem is chip selection in PlatformIO board menu?
I am aware of troubleshooting steps presented in esp32s3 documentation:https://docs.espressif.com/projects/esp ... oting.html (link 2)
Cant find where the problem is. The programmer I am using is USB-UART bridge with CP2102 Silabs chip(attaching photo). Regarding the strapping pins, I have followed the steps presented in the same datasheet of the chip (link 1), meaning GPIO pins: 45, 46, 3 are left unconnected. The only strapping pin connected is GPIO0 with 10K pulldown resistor and a button. Similar configuration is used with EN pin. The idea was to re-create development board configuration on the breadboard. The end goal is to be able to program esp32 chip soldered onto pcb with external usb-uart bridge connection. Thank you for taking your time. If you see obvious flaws in my plan, please let me know.

Sincerely, Jonas
Attachments
code and error snippets.png
code and error snippets.png (59.37 KiB) Viewed 2484 times
usb to uart bridge.jpg
usb to uart bridge.jpg (5.97 MiB) Viewed 2484 times

ESP_LJH
Posts: 384
Joined: Tue May 18, 2021 9:21 am

Re: ESP32S3wroom1 chip flash error

Postby ESP_LJH » Tue Nov 29, 2022 7:34 am

How do you power the module? The supply current is at least 500 mA, right?
If you could see UART0 log through serial tool and what is the log.
Please take a photo of your connections of module.

JonasL
Posts: 13
Joined: Mon Nov 28, 2022 4:37 pm

Re: ESP32S3wroom1 chip flash error

Postby JonasL » Tue Nov 29, 2022 10:34 am

I am powering the chip directly from usb bridge. It gives 3.33 volts. Regarding the current I am not quite sure how to check the supplied current carefully. As far as I know people dont recommend doing it with a multimeter as it is not safe and you can damage internal computer circuitry. Is usbmeter required? Could you explain what you mean with the second sentence as I am not sure what it means. Do I need to edit my code so I could see log messages printed on the PlatformIO terminal? I am attaching photo of the connections on the module. TXD0 pin on the chip is connected to RXD on the USB bridge and RXDO on the chip is wired to TXD on the USB bridge. 2 bypass caps 22uF and 0.1 uF are added as well as RESET circuitry presented in the datasheet schematics and the boot option to pull GPIO0 down to enter download mode.
Attachments
peripheral schematics from the datasheet.png
peripheral schematics from the datasheet.png (74.24 KiB) Viewed 2358 times
connections2.png
connections2.png (791.97 KiB) Viewed 2358 times
connections.png
connections.png (1.32 MiB) Viewed 2358 times

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32S3wroom1 chip flash error

Postby ESP_Sprite » Wed Nov 30, 2022 8:44 am

JonasL wrote:
Tue Nov 29, 2022 10:34 am
I am powering the chip directly from usb bridge.
That is very likely to be the (or at least a) culprit. Those things generally can only output tens of mA on their 3.3V output line, not enough to power an ESP32. Suggest you get a steady 3.3V from somewhere else.

JonasL
Posts: 13
Joined: Mon Nov 28, 2022 4:37 pm

Re: ESP32S3wroom1 chip flash error

Postby JonasL » Sat Dec 03, 2022 2:40 pm

Hello once again, guys. As of now I am using the following schematic (*attaching photo). The chip is powered from external USB cable through voltage regulator. I was able to get through connecting phase in the serial terminal and it seems like code is uploading. Code uploading is not consistent. Sometimes it works, sometimes it doesn't. The problem is that esp does not execute my code after I unplug usb bridge programmer. I am trying to raise logic level of a particular pin to light up LED. No luck. I am attaching a photo of messages in the PlatformIO terminal. Maybe from that information you guys could tell what is the obvious problem here. Maybe VS code and PlatformIO extension is not suitable for ESP programming without development board? I have no idea whether this is a hardware related problem or the programming route is flawed. All kind of ideas would help.

Sincerely,
Jonas
Attachments
message2.png
message2.png (23.16 KiB) Viewed 2277 times
message1.png
message1.png (60.53 KiB) Viewed 2277 times
schematics.png
schematics.png (15.33 KiB) Viewed 2277 times

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32S3wroom1 chip flash error

Postby ESP_Sprite » Sun Dec 04, 2022 6:16 am

Note that the LM317 probably will work, but is not working within its specifications: the chip wants at least 3V between its input and output and in your case it's only 1.7V and even lower if there's any sag on the 5V line. For production stuff, you might want to switch to something like a LM1117.

Note that to boot the chip, in your circuit you'd need to release the GPIO0 button and press the 'reset' button again. Can you try that?

JonasL
Posts: 13
Joined: Mon Nov 28, 2022 4:37 pm

Re: ESP32S3wroom1 chip flash error

Postby JonasL » Sun Dec 04, 2022 9:59 am

Thank you for your insight. I have measured the voltage between LM317 output and GND and I am getting 3.29 volts. Tomorrow I am going to order LM1117 and when I get those, changes will be made. Regarding the boot option, when the PlatformIO terminal says connecting I usually press boot and reset at the same time and then release reset and then I release the boot button. Do you know the correct order to push these buttons to enter into download mode? As I said I am not able to get through this phase consistently. If LM317 I am using is not suitable for this circuit and is disturbing code uploading process, wouldn't I wont be able to see the success upload message in the terminal window? From the datasheet I have made a conclusion that only GPIO0 from the strapping pins is needed as other pins in the default mode are good for this task. Maybe other strapping pins need to be implemented also?

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32S3wroom1 chip flash error

Postby ESP_Sprite » Mon Dec 05, 2022 4:36 am

No, you're misunderstanding me. Flashing goes correctly, but after flashing, the chip will stay in download mode. You'd need to press the reset button (without pressing the IO0 button) to get the chip out of download mode; if you don't, the chip will just 'sit there' expecting more download commands.

I think in practice the LM317 shouldn't be an issue when it comes to booting the chip; you can keep on testing with that. Just be aware that if you run into brownout issues when starting WiFi, that is probably the issue.

JonasL
Posts: 13
Joined: Mon Nov 28, 2022 4:37 pm

Re: ESP32S3wroom1 chip flash error

Postby JonasL » Mon Dec 05, 2022 8:21 pm

I have tried pressing reset button after I unplugged the programmer, tried to hold the reset button for a couple of secs and then let go, but still the LED wont light up. At this point I have no clue how to fix this or what may be the possible culprit of my failure. To my understanding after the code is uploaded esp just switches to SPI boot and executes the code. Why development boards dont require pressing reset after code is uploaded?

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32S3wroom1 chip flash error

Postby ESP_Sprite » Tue Dec 06, 2022 3:26 am

Because development boards have a little two-transistor circuit between the DTR and DSR lines of the USB serial device and the EN and IO0 of the ESP32. You're lacking that.

Can you leave the serial programmer connected, start a terminal (or perhaps platformio has some kind of serial monitor) on it, and reset the chip while not pressing the IO0 button? It should tell you what it's doing then.

Alternatively, you can get around the serial programmer mess by using the internal USB-JTAG-serial converter in the S3. Simply take an USB cable, strip it, and connect it like this. (Note that you still need to provide 3.3V power; you could do that by taking the red wire from the USB cable and using it as the +5V input for your LDO.) The ESP32S3 should show up as a serial port and it will also emulate the two-transistor reset circuit I mentioned before.

Who is online

Users browsing this forum: Google [Bot] and 60 guests