Chat freely about anything...

User avatar
By lucasromeiro
#74217 Hi, I bought enough ms I did not find a command for arduino that made ESP enter flash mode.
No longer available or restart with Flash.
It needs to be a command or just the flash button. I'm trying to push the flash button to reset the ESP via software and continue to press it to try to enter a flash node ... it does not work.
User avatar
By btidey
#74223 You need to say what type of esp module you are using.

From an Arduino environment one flashes a new sketch by doing an upload operation over the serial connection after putting the module into flash mode.

Putting the module into flash mode depends on 3 GPIO Pins being in the correct state when a reset is applied. GPIO15 must be low, GPIO01 must be high, and GPIO00 must be low. Normally GPIO15 is low and GPIO01 is high for normal running so GPIO00 is then what determines going into flash mode or normal running when a reset is applied.

The GPIO00 toggling to get into flash mode can be done in several ways depending on the module being used.

Some modules have circuitry included (e.g. NodeMCU) so that this happens automatically. The circuitry detects that the Arduino is going to do an upload and makes GPIO00 low when resetting.

Some modules have flash and reset buttons. The flash button is connected to GPIO00. So you press AND hold the flash button while pushing and releasing the reset button. The chip is now expecting an upload so you start the Arduino command.

Some modules are just raw modules so you have to make your own arrangements to have th epins in the correct state while applying a reset.
User avatar
By lucasromeiro
#74224
btidey wrote:You need to say what type of esp module you are using.

From an Arduino environment one flashes a new sketch by doing an upload operation over the serial connection after putting the module into flash mode.

Putting the module into flash mode depends on 3 GPIO Pins being in the correct state when a reset is applied. GPIO15 must be low, GPIO01 must be high, and GPIO00 must be low. Normally GPIO15 is low and GPIO01 is high for normal running so GPIO00 is then what determines going into flash mode or normal running when a reset is applied.

The GPIO00 toggling to get into flash mode can be done in several ways depending on the module being used.

Some modules have circuitry included (e.g. NodeMCU) so that this happens automatically. The circuitry detects that the Arduino is going to do an upload and makes GPIO00 low when resetting.

Some modules have flash and reset buttons. The flash button is connected to GPIO00. So you press AND hold the flash button while pushing and releasing the reset button. The chip is now expecting an upload so you start the Arduino command.

Some modules are just raw modules so you have to make your own arrangements to have th epins in the correct state while applying a reset.


Hi, thanks for the reply! but I think you do not understand my doubt.
I'm using node mcu (esp12e).
I understand how the logic level of pins works to get into flash mode!
I've already used the mcu node for a while! I also know that it does automatically when I send a program to it through the usb chip.
But it's not what I need ...
I'll explain better:
I have a product that has no reset button, it only has the flash button!
I want that by pressing this button, inside the code I identify that it was pressed and execute some command so that it enters flash mode.
Understood?

As I mentioned above, I tried to make this button disappear the esp.reset program and keep the button pressed to enter flash mode. but it did not work.
User avatar
By btidey
#74227 OK. Clearer now.

You should be able to read the state of the flash button by putting GPIO00 into input mode and doing a digitalRead. 1 would be button up 0 would be button down.

However, I am not aware of a method to programmatically put the chip into serial flash upload mode.

Can you say what you are trying to achieve? Maybe using OTA might be an alternative technique to get new firmware loaded. E.g. detect flash button, initiate OTA with a server where new binary is located.