Need help to download firmware into ESP32
Need help to download firmware into ESP32
Hi,
I have one ESP32 Demo Development Kit and I want to download my firmware into that board without using DIP Switch 4 or other firmware download switch.
As per ESP32 Datasheet, GPIO0 and GPIO2 should be low to enter module into download mode.
So, can anyone confirm that GPIO0 and GPIO2 should be low to enter module into download mnode or any other configurations are required for that?
Regards,
Ritesh Prajapati
I have one ESP32 Demo Development Kit and I want to download my firmware into that board without using DIP Switch 4 or other firmware download switch.
As per ESP32 Datasheet, GPIO0 and GPIO2 should be low to enter module into download mode.
So, can anyone confirm that GPIO0 and GPIO2 should be low to enter module into download mnode or any other configurations are required for that?
Regards,
Ritesh Prajapati
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need help to download firmware into ESP32
My experience is that when GPIO0 is explicitly low at boot time then the device starts in flash mode (ready to receive a new program) and when floating or explicitly brought high at boot, it enters normal run mode. I have so far not needed to hold GPIO2 at either 0 or 1 to achieve the two modes of interest to me (flash mode and run mode). Pulsing the EN pin is what I use to reboot.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Need help to download firmware into ESP32
Hi,
I was able to download firmware into ESP32_Demo V2 Development board using DIP Switch 4 But I have created one board based on ESP32 chip and i was trying download firmware using same method like GPIO0 and GPIO2 should be low as per ESP32 Datasheet.
Download Boot Settings mentioned into ESP32 Data-sheet
---------------------------------------------------------------------------
GPIO0 should be 0
GPIO2 should be 0
I have tried with above settings but not able to connect with ESP32 chip while downloading firmware into it.
I am getting following error while loading firmware into it
I was able to download firmware into ESP32_Demo V2 Development board using DIP Switch 4 But I have created one board based on ESP32 chip and i was trying download firmware using same method like GPIO0 and GPIO2 should be low as per ESP32 Datasheet.
Download Boot Settings mentioned into ESP32 Data-sheet
---------------------------------------------------------------------------
GPIO0 should be 0
GPIO2 should be 0
I have tried with above settings but not able to connect with ESP32 chip while downloading firmware into it.
I am getting following error while loading firmware into it
So, Please let me know if you have idea or clue for this type issue.Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.0-dev
Connecting...
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
make: *** [flash] Error 2
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need help to download firmware into ESP32
On your custom board do you get any output from bootloader when connected to a terminal?
Re: Need help to download firmware into ESP32
Hi,
Problem has been solved. It was some silly mistake of other hardware components which causes this issue.
Thanks for providing support for this.
Problem has been solved. It was some silly mistake of other hardware components which causes this issue.
Thanks for providing support for this.
Regards,
Ritesh Prajapati
Ritesh Prajapati
-
- Posts: 7
- Joined: Wed Nov 02, 2016 9:40 pm
Re: Need help to download firmware into ESP32
Hi Ritesh,
I struggle with the same output when flashing on an ESP-32S. Could you please explain a little more what you did to make it work?
When booting in normal mode, I get the below output. Not quite sure if this is expected at first boot. And when I reboot with IO0 to GND, I get the same timeout output as you.
I struggle with the same output when flashing on an ESP-32S. Could you please explain a little more what you did to make it work?
When booting in normal mode, I get the below output. Not quite sure if this is expected at first boot. And when I reboot with IO0 to GND, I get the same timeout output as you.
(RTCWDTRTCRESET),bt:0x17 (SPIFASTFLASHBO_T)
flash read err, 1000
Falling back to built-in cmmand interpreter.
OK
>�
Re: Need help to download firmware into ESP32
Hi,
First of all, I want to know which board are you using for you development purpose? Means ESP32-Dev board V2 or any other ESP32 based custom board?
Also, which firmware you have flashed in your ESP32 based board?
Are you using any ESP32 bases module like ESP-WROOM-32 or directly using ESP32 chip?
Also, which RTOS SDK you are using for your ESP32 development purpose?
The error seem like that you are using ESP31 based SDK which was used on ESP31 bit board before releasing ESP32-idf SDK and board.
So, please first check SDK and board which you are uong so that I can help you ahead for your problem.
Let me know if you need any more help on this.
First of all, I want to know which board are you using for you development purpose? Means ESP32-Dev board V2 or any other ESP32 based custom board?
Also, which firmware you have flashed in your ESP32 based board?
Are you using any ESP32 bases module like ESP-WROOM-32 or directly using ESP32 chip?
Also, which RTOS SDK you are using for your ESP32 development purpose?
The error seem like that you are using ESP31 based SDK which was used on ESP31 bit board before releasing ESP32-idf SDK and board.
So, please first check SDK and board which you are uong so that I can help you ahead for your problem.
Let me know if you need any more help on this.
Regards,
Ritesh Prajapati
Ritesh Prajapati
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: Need help to download firmware into ESP32
RoundRobin: Do you happen to have GPIO12 connected to something? Can you try disconnecting that pin?
-
- Posts: 7
- Joined: Wed Nov 02, 2016 9:40 pm
Re: Need help to download firmware into ESP32
>First of all, I want to know which board are you using for you development purpose? Means ESP32-Dev board V2 or any other ESP32 based custom board?
I am using the ESP-32S module from Ai-Thinker. It is pin equivalent with the ESP-WROOM-32. My setup is shown in the picture below, I have only wired up the module in a breadboard for now.
>Also, which firmware you have flashed in your ESP32 based board?
It is a fresh module, I haven't flashed anything yet. Should I?
>Also, which RTOS SDK you are using for your ESP32 development purpose?
>The error seem like that you are using ESP31 based SDK which was used on ESP31 bit board before releasing ESP32-idf SDK and board.
I have just followed the instructions in the getting started manual, and I have the most updated IDF from github.
>RoundRobin: Do you happen to have GPIO12 connected to something? Can you try disconnecting that pin?
No, nothing connected to that pin as of now
But after a lot of fiddling yesterday, I suddenly thought of using a common ground for the serial to USB converter and the ESP32. This actually helped me one step further, but I'm still having problems.
Flashing procedure:
1. Boot with the boot button pressed
The following is displayed::
with the same result
After flashing fails, boot in normal mode continue to display the following output: gives the following output:
I get the following
I am using the ESP-32S module from Ai-Thinker. It is pin equivalent with the ESP-WROOM-32. My setup is shown in the picture below, I have only wired up the module in a breadboard for now.
>Also, which firmware you have flashed in your ESP32 based board?
It is a fresh module, I haven't flashed anything yet. Should I?
>Also, which RTOS SDK you are using for your ESP32 development purpose?
>The error seem like that you are using ESP31 based SDK which was used on ESP31 bit board before releasing ESP32-idf SDK and board.
I have just followed the instructions in the getting started manual, and I have the most updated IDF from github.
>RoundRobin: Do you happen to have GPIO12 connected to something? Can you try disconnecting that pin?
No, nothing connected to that pin as of now
But after a lot of fiddling yesterday, I suddenly thought of using a common ground for the serial to USB converter and the ESP32. This actually helped me one step further, but I'm still having problems.
Flashing procedure:
1. Boot with the boot button pressed
The following is displayed:
2. Inside ~/workspace/01_hello_world/ I runrst:0x1 (POWERON_RESET),boot:0x0 (DOWNLOAD_BOOT(UART0/UART1/SDIO_FEI_FEO_V2))
waiting for download
Code: Select all
make flash
I have also runFlashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.0-dev
Connecting...
Uploading stub...
Running stub...
Stub running...
Attaching SPI flash...
Configuring flash size...
Compressed 9824 bytes to 5356...
A fatal error occurred: Timed out waiting for packet content
/home/.../esp-idf/components/esptool_py/Makefile.projbuild:47: recipe for target 'flash' failed
make: *** [flash] Error 2
Code: Select all
make bootloader-flash
After flashing fails, boot in normal mode continue to display the following output:
It seems like it is stuck in this mode, now>How?
What?
>
>>
How?
>
>
How?
>
>How?
What?
>
>>
How?
>
>>What?
How?
>
Code: Select all
make flash
or sometimesFlashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.0-dev
Connecting...
Uploading stub...
A fatal error occurred: Failed to write to target RAM (result was 0x1, 0x7, 0x0, 0x0)
/home/.../esp-idf/components/esptool_py/Makefile.projbuild:47: recipe for target 'flash' failed
make: *** [flash] Error 2
When I runFlashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.0-dev
Connecting...
Uploading stub...
A fatal error occurred: Response doesn't match request
/home/.../esp-idf/components/esptool_py/Makefile.projbuild:47: recipe for target 'flash' failed
make: *** [flash] Error 2
Code: Select all
./esptool.py --port /dev/ttyUSB0 read_flash_status
Seems a little bricked to me..esptool.py v2.0-dev
Connecting...
Detecting chip type... ESP32
A fatal error occurred: Timed out waiting for packet header
- Attachments
-
- esp32_conn.png (227.04 KiB) Viewed 31445 times
Re: Need help to download firmware into ESP32
The output looks to me like a serial communications problem (noise/interference), or (more likely) that the chip is browning out. These are common problems using bare modules, both for ESP8266 and ESP32.
What's the 3.3V power source that you're powering the module from? It should have a high current rating (at least 250mA, once you enable WiFi you probably want to be closer to 500mA.) How thick/long are the wires providing power to the module? In addition to the current rating, are you able to add any capacitors on the 3.3V power rail, close to the ESPWROOM32 module?
EDIT: It's also possible some other program is accessing the serial port and interrupting communciations. If you have maybe modem-manager installed (it's part of a lot of default Linux distribution configurations), it can sometimes do this.
What's the 3.3V power source that you're powering the module from? It should have a high current rating (at least 250mA, once you enable WiFi you probably want to be closer to 500mA.) How thick/long are the wires providing power to the module? In addition to the current rating, are you able to add any capacitors on the 3.3V power rail, close to the ESPWROOM32 module?
EDIT: It's also possible some other program is accessing the serial port and interrupting communciations. If you have maybe modem-manager installed (it's part of a lot of default Linux distribution configurations), it can sometimes do this.
Who is online
Users browsing this forum: Bing [Bot] and 46 guests