How to flash the ESP32

LazyElectron
Posts: 4
Joined: Sat Aug 31, 2024 2:15 pm

How to flash the ESP32

Postby LazyElectron » Sat Aug 31, 2024 2:54 pm

Hi all
I write from Italy

I'm new in ESP32, and telling the truth I just bought some ESP-01M (ESP8285) modules two months ago, just to test them.
I found the "game" really interesting, so I'm here because I want to try to build my first own board using the ESP32 model (as I need both the WiFi and Blutooth features, to be used in separate moments), but I ran into difficulties gathering info about their usage.
I normally draw my projects adopting Atmel, NXP, Texas and STM microcontrollers in single or multiCPU projects, and I usually avoid the usage of a bootloader.
I'd try to connect the ESP32 chip to a STM main microcontroller, in this particular -first- case.
Is it possible to flash a ESP32 chip using one of its ISP ports (just for example?) on some Atmel models it is possible to flash programs using their proprietary UPDI protocol on a single pin, anything similar on the Espressif side?
My questions could be considered stupid but I did not find clear information on that, as I started to gather info 3 days ago without luck, I just found info and utube videos on how to flash the ESP32 via UART (using a preloaded bootloader, of course).
Does ESP32 come with a preinstalled bootloader by Espressif?
I usually send a particular string to the main chip of my circuits, in order to switch the communication and redirect the following data stream (program or data) to the target chips. Could I be able to do so using the ESP32 as a peripheral?

I'm not ready to consider the usage of the ESP32 alone, as a main microcontroller in this moment.
I've not knowledge and experience to do that.

Thank you for your attention
Romano

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

Re: How to flash the ESP32

Postby ESP_Sprite » Sun Sep 01, 2024 12:01 am

LazyElectron wrote:
Sat Aug 31, 2024 2:54 pm
I normally draw my projects adopting Atmel, NXP, Texas and STM microcontrollers in single or multiCPU projects, and I usually avoid the usage of a bootloader.
I'd try to connect the ESP32 chip to a STM main microcontroller, in this particular -first- case.
Is it possible to flash a ESP32 chip using one of its ISP ports (just for example?) on some Atmel models it is possible to flash programs using their proprietary UPDI protocol on a single pin, anything similar on the Espressif side?
You normally flash an ESP32 via either the first UART or (if the particular ESP32 variant you picked has them) the USB pins. In the second case, just hook up a cable or connector straight to an USB port of your PC and you're set; no programmer needed.
Does ESP32 come with a preinstalled bootloader by Espressif?
Not only pre-installed; it comes in ROM so there is no chance of erasing it.
I usually send a particular string to the main chip of my circuits, in order to switch the communication and redirect the following data stream (program or data) to the target chips. Could I be able to do so using the ESP32 as a peripheral?
You could. Alternatively (if e.g. you're going to do OTA updates where your system fetches updates via WiFi without being attached to a computer) we have a library that allows the connected MCU to flash the ESP.

LazyElectron
Posts: 4
Joined: Sat Aug 31, 2024 2:15 pm

Re: How to flash the ESP32

Postby LazyElectron » Tue Sep 03, 2024 7:43 am

ESP_Sprite wrote:
Sun Sep 01, 2024 12:01 am

You normally flash an ESP32 via either the first UART or (if the particular ESP32 variant you picked has them) the USB pins. In the second case, just hook up a cable or connector straight to an USB port of your PC and you're set; no programmer needed.


Not only pre-installed; it comes in ROM so there is no chance of erasing it.


You could. Alternatively (if e.g. you're going to do OTA updates where your system fetches updates via WiFi without being attached to a computer) we have a library that allows the connected MCU to flash the ESP.
thank you very much!

Your info are very appreciated, I did not know the fact that I cannot avoid the bootloader usage, but it's not a big problem in any case.
I'll manage to send the program to the ESP32 via UART, connecting directly it to the main processor (and doing the "setup" routine on the specific 2 pins, GPIO 10 and another, as I've read on another thread)

In this particular case the ESP32 will do very simple autonomous operations (I'm just thinking to make it run small routines). I will use it as WiFi and Blutooth interface mainly, but in the same time I'd like to "play" a little bit, in order to understand which libraries are compatible with it, as I normally use graphic displays, clock, voice interaction, A/D samplers etc. in my devices (via ISP and I2C).
The problem is this one: I have no idea of the library compatibility at the moment, as the final target is the usage of standalone ESP32s in some projects.

I'm thinking to produce a small PCB for the ESP with pin breakout in the beginning, in order to make many different tests, connecting it to a STM uC and different I2C and ISP peripherals.

Thank you again!

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 81 guests