Problems with flashing ESP Wroom-02

1.9k Views Asked by At

So I am having issues with flashing an ESP Wroom-02 Wifi chip. The one that I have gotten is the kind with built-in micro USB port so I can just connect a cable from my laptop straight to the WiFi chip and program it. On the board there is also two button labelled Flash and Reset.

I have looked through Espressif's official documents and online guides as well. All I want is to test the various AT commands.

Here are some of the files that I have from the official Espressif website under the folder /ESP8266_AT_Bin_V1.7/bin:
blank.bin -> 4KB
boot_v1.2.bin -> 2KB
boot_v1.6.bin -> 4KB
boot_v1.7.bin -> 4KB
esp_init_data_default_v0.5.bin -> 1KB
esp_init_data_default_v0.8.bin -> 1KB

/ESP8266_AT_Bin_V1.7/bin/at/1024+1024
user1.2048.new.bin -> 445KB
user2.2048.new.bin -> 445KB

I am using the ESP Flash Download Tool from Espressif themselves. Settings such as:

CrystalFreq: 26M
SPI Speed: 40MHZ
SPI Mode: QIO / DIO (tried both)
Flash Size: 4Mbit 2Mbit 8Mbit 16Mbit 32Mbit 16Mbit-C1 32Mbit-C1


DETECTED INFO:
flash devID -> 4015h QUAD; 16Mbit
crystal -> 26Mhz

So after trying various combinations of the files and settings (while following the official manual and online guides), there were times I see the the sentence "-> ready" from the serial monitor but when I send the command AT or AT+GMR I get backed "-> ERROR".

What could be the issue? I would really appreciate some help with this. If anyone of you managed to successfully flashed the Wroom-02 with the provided firmware from Espressif and get the correct reply when sending commands such as AT or AT+GMR, please share the settings that you used when flashing the firmware (e.g. the memory address for the various files and Spi Flash Config).

Much thanks in advance!

This is what I get when I connect it using a serial terminal and hit the reset button.

ESP8266 Bootloader Code

1

There are 1 best solutions below

0
On BEST ANSWER

Wow ok. Apparently what I did was correct. Here is the setting that I used:

ESP Wroom-02 Flash Setting

Your result may vary depending on the size of flash that your Wroom-02 comes with. On some tutorials you might notice a difference in the FLASH SIZE option. Don't ask me why but mine just works with 16Mbit-C1. Part of the DETECTED INFO returned to me also showed 16Mbit anyway.

So after flashing and then connecting it to a serial monitor with baud rate 74880 on Arduino IDE and then pressing a reset would give me results like what I have posted in my question previously. That actually is correct. Here comes the reason why I thought it wasn't working.

Carriage Return.

Only Newline option

I sent the commands with only the Newline enabled. Therefore it kept returning ERROR.

This is what should have been done.

Newline & Carriage Return

Now when you send the commands with NL & CR enabled, both AT and AT+GMR commands work now.

This is from Espressif's documentation under the AT Instruction Set pdf.

Flash Map from Espressif's AT Instruction Set pdf

You might have noticed that my initial flash settings uses only 4 files while the official flash map uses 6 files. I can ascertain that both ways can successfully flash the firmware onto the chip. AT and AT+GMR command work as well.