MD5 mismatch on ESP32

timchpi
Posts: 3
Joined: Sat Oct 06, 2018 8:07 pm

MD5 mismatch on ESP32

Postby timchpi » Sat Oct 06, 2018 11:19 pm

Morning:
I got a circuit using ESP-wroom-32. From yesterday, when I attempts to upload the program, it tells me

Code: Select all

A fatal error occurred: MD5 of file does not match data in flash!
The MD5 of flash stays the same every time.

I use Arduino IDE 1.8.5.
I tried erasing flash, it finished without any error reported, however, it is believed to not being erased as it should since erasing a working DevKit-C that i got, it make the DevKit-C resets rapidly. But wroom after erasing just shows user code done.

The only thing that could be wrong is yesterday when I was programming another chip(Atmel) which shares the Vdd rail, I have put 5v on Vdd - ESP32 has been taking 5v for around 2 minutes.

Most fuses are not burnt, as far as I know(I found out DevKit-C got CONSOLE_DEBUG_DISABLE burnt so I did the same on wroom).

Fuses and complete error will be listed below.

Any help will be appreciated.
Regards.

esptool flash_id on malfunctioning wroom:

Code: Select all

./esptool.py flash_id
esptool.py v2.5.1-dev
Found 1 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core
MAC: 30:ae:a4:0d:70:ec
Uploading stub...
Running stub...
Stub running...
Manufacturer: c8
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...
espefuse on working DevKit-C:

Code: Select all

 ./espefuse.py --port /dev/ttyUSB0 summary
espefuse.py v2.5.1-dev
Connecting....
Security fuses:
FLASH_CRYPT_CNT        Flash encryption mode counter                     = 0 R/W (0x0)
FLASH_CRYPT_CONFIG     Flash encryption config (key tweak bits)          = 0 R/W (0x0)
CONSOLE_DEBUG_DISABLE  Disable ROM BASIC interpreter fallback            = 1 R/W (0x1)
ABS_DONE_0             secure boot enabled for bootloader                = 0 R/W (0x0)
ABS_DONE_1             secure boot abstract 1 locked                     = 0 R/W (0x0)
JTAG_DISABLE           Disable JTAG                                      = 0 R/W (0x0)
DISABLE_DL_ENCRYPT     Disable flash encryption in UART bootloader       = 0 R/W (0x0)
DISABLE_DL_DECRYPT     Disable flash decryption in UART bootloader       = 0 R/W (0x0)
DISABLE_DL_CACHE       Disable flash cache in UART bootloader            = 0 R/W (0x0)
BLK1                   Flash encryption key                              
  = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W 
BLK2                   Secure boot key                                   
  = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W 
BLK3                   Variable Block 3                                  
  = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W 

Efuse fuses:
WR_DIS                 Efuse write disable mask                          = 0 R/W (0x0)
RD_DIS                 Efuse read disablemask                            = 0 R/W (0x0)
CODING_SCHEME          Efuse variable block length scheme                = 0 R/W (0x0)
KEY_STATUS             Usage of efuse block 3 (reserved)                 = 0 R/W (0x0)

Config fuses:
XPD_SDIO_FORCE         Ignore MTDI pin (GPIO12) for VDD_SDIO on reset    = 0 R/W (0x0)
XPD_SDIO_REG           If XPD_SDIO_FORCE, enable VDD_SDIO reg on reset   = 0 R/W (0x0)
XPD_SDIO_TIEH          If XPD_SDIO_FORCE & XPD_SDIO_REG, 1=3.3V 0=1.8V   = 0 R/W (0x0)
SPI_PAD_CONFIG_CLK     Override SD_CLK pad (GPIO6/SPICLK)                = 0 R/W (0x0)
SPI_PAD_CONFIG_Q       Override SD_DATA_0 pad (GPIO7/SPIQ)               = 0 R/W (0x0)
SPI_PAD_CONFIG_D       Override SD_DATA_1 pad (GPIO8/SPID)               = 0 R/W (0x0)
SPI_PAD_CONFIG_HD      Override SD_DATA_2 pad (GPIO9/SPIHD)              = 0 R/W (0x0)
SPI_PAD_CONFIG_CS0     Override SD_CMD pad (GPIO11/SPICS0)               = 0 R/W (0x0)
DISABLE_SDIO_HOST      Disable SDIO host                                 = 0 R/W (0x0)

Identity fuses:
MAC                    MAC Address                                       
  = 30:ae:a4:46:fc:ec (CRC a5 OK) R/W 
CHIP_VER_REV1          Silicon Revision 1                                = 1 R/W (0x1)
CHIP_VERSION           Reserved for future chip versions                 = 0 R/W (0x0)
CHIP_PACKAGE           Chip package identifier                           = 0 R/W (0x0)

Calibration fuses:
BLK3_PART_RESERVE      BLOCK3 partially served for ADC calibration data  = 0 R/W (0x0)
ADC_VREF               Voltage reference calibration                     = 1100 R/W (0x0)

Flash voltage (VDD_SDIO) determined by GPIO12 on reset (High for 1.8V, Low/NC for 3.3V).
The result of espefuse on malfunctioning wroom is same.

The complete error message on wroom when programming:

Code: Select all

esptool.py v2.3.1
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...

Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 31239.7 kbit/s)...
Hash of data verified.
Compressed 15072 bytes to 9733...

Writing at 0x00001000... (100 %)
Wrote 15072 bytes (9733 compressed) at 0x00001000 in 0.1 seconds (effective 1073.0 kbit/s)...
Hash of data verified.
Compressed 174992 bytes to 88362...

Writing at 0x00010000... (16 %)
Writing at 0x00014000... (33 %)
Writing at 0x00018000... (50 %)
Writing at 0x0001c000... (66 %)
Writing at 0x00020000... (83 %)
Writing at 0x00024000... (100 %)
Wrote 174992 bytes (88362 compressed) at 0x00010000 in 1.1 seconds (effective 1225.4 kbit/s)...
File  md5: 30e8940494a526f5ea77c4d3e1cf82ce
Flash md5: ab63517c660979c1b3b843fdf84c0054
MD5 of 0xFF is 90700f991365bbf4028fb21a4340ab7d

A fatal error occurred: MD5 of file does not match data in flash!
A fatal error occurred: MD5 of file does not match data in flash!


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

Re: MD5 mismatch on ESP32

Postby ESP_Sprite » Sun Oct 07, 2018 2:15 am

Smells like the 5V damaged the flash chip, to be honest. ESP32 seems to have more-or-less survived.

timchpi
Posts: 3
Joined: Sat Oct 06, 2018 8:07 pm

Re: MD5 mismatch on ESP32

Postby timchpi » Sun Oct 07, 2018 9:50 pm

Hey there:
Is there a way to fix the problem without a new ESP32?

Thanks

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

Re: MD5 mismatch on ESP32

Postby ESP_Sprite » Mon Oct 08, 2018 1:04 am

Before you do this, one last thing that can also cause this: is your GPIO12 hooked up to something? A wrong level on that pin selects a wrong flash voltage, which can also cause issues.

You can desolder the metal shield on the Wroom and replace the flash chip that's under there. It's only an eight-pin part, so even while it's SMD, soldering it is not that hard. The harder bit is getting the shield off using a hot air gun or so, without also desoldering the parts underneath.

timchpi
Posts: 3
Joined: Sat Oct 06, 2018 8:07 pm

Re: MD5 mismatch on ESP32

Postby timchpi » Mon Oct 08, 2018 2:08 am

Hi there:
Not really. GPIO12 is unconnected.
Where can i get replacement of flash? Or is it just any 4MB SMD flash?
Thanks
Regards.

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

Re: MD5 mismatch on ESP32

Postby ESP_Sprite » Mon Oct 08, 2018 8:52 am

Most 32MBit quad-SPI-capable flash chips will work, to my knowledge. You're best off replacing it with the same one, but if you have any random ones lying around, trying one is an option.

Who is online

Users browsing this forum: No registered users and 134 guests