Author Topic: Reflashing ESP8266 from scratch?  (Read 5274 times)

0 Members and 1 Guest are viewing this topic.

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6230
  • Country: us
Reflashing ESP8266 from scratch?
« on: March 30, 2015, 04:41:13 pm »
TL;DR  when I reflash an ESP8266 module, does it reflash it from scratch or does still depend on previous content.

I have a ESP8266 module that I used for a few weeks for development (Lua). Yesterday it stopped responding to Lua commands. I reflashed the Lua binary a few times, the flashing went ok but still no response. I looked at the output it sends after reset and saw 'MEM CHECKSUM FAIL' (don't remember the exact text). I swapped a memory chip from another board and it worked again.

The fact that the reflashing process gave no errors suggests to me that the memory IC is good. Is it possible that some other content in the memory IC was corrupt but the reflash doesn't touch that section?

I am using this command
./esptool.py --port /dev/tty.usbserial-A602VGAX --baud 9600 write_flash 0x00000 nodemcu_20150213.bin

 

Offline brainwash

  • Frequent Contributor
  • **
  • Posts: 463
  • Country: de
    • Hack Correlation
Re: Reflashing ESP8266 from scratch?
« Reply #1 on: March 30, 2015, 06:22:21 pm »
AFAIK the flash chips on these modules are notoriously bad, there was an article on Hack-a-day or esp8266.com about this.
I would recommend a flash chip replacement to anyone who intends to flash more than a dozen times. It's that bad.
 

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6230
  • Country: us
Re: Reflashing ESP8266 from scratch?
« Reply #2 on: March 30, 2015, 06:54:02 pm »
AFAIK the flash chips on these modules are notoriously bad, there was an article on Hack-a-day or esp8266.com about this.
I would recommend a flash chip replacement to anyone who intends to flash more than a dozen times. It's that bad.

A dozen times? That's very low.

Doesn't the esptool verify the read and verify after writing?
 

Offline LukeW

  • Frequent Contributor
  • **
  • Posts: 686
Re: Reflashing ESP8266 from scratch?
« Reply #3 on: April 08, 2015, 02:30:35 pm »
AFAIK the flash chips on these modules are notoriously bad, there was an article on Hack-a-day or esp8266.com about this.
I would recommend a flash chip replacement to anyone who intends to flash more than a dozen times. It's that bad.

I'd love to read about that if you could find the link.
 

Offline brainwash

  • Frequent Contributor
  • **
  • Posts: 463
  • Country: de
    • Hack Correlation
Re: Reflashing ESP8266 from scratch?
« Reply #4 on: April 08, 2015, 02:50:32 pm »
Sorry, I've searched for 1h and cannot find the link or discussion anymore. Maybe it was related to nRF24L01+ modules, but I don't think so.

What I remember was someone having to resolder the flash chip after ~50 flashes to which someone else replied that they might be using recycled SPI flash chips in order to get the low cost, which makes sense.
You can take it as circumstantial evidence, at best, but a repository/poll would be more useful, where people are documenting how many successful flashes they have performed on a single module.
Since I cannot find the source anymore you can ignore my comment or take it with a big grain of salt.
 

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6230
  • Country: us
Re: Reflashing ESP8266 from scratch?
« Reply #5 on: April 08, 2015, 02:51:09 pm »
AFAIK the flash chips on these modules are notoriously bad, there was an article on Hack-a-day or esp8266.com about this.
I would recommend a flash chip replacement to anyone who intends to flash more than a dozen times. It's that bad.

I had another one dying on me last night. I replaced the flash IC from another board and it worked again. I only reflashed a few times but then I realized that I have two node.compile() calls in my init.lua which write to the flash each time it reboooted (a few hundreds of times). I removed the compile statements and will now do it manually once when pushing a new lua file (the code is stable by now).

If anybody know of a better drop in replacement flash chip or a source for the original chip please post it here.

EDIT: I think this is the datasheet of the original flash. Could find endurance spec.   http://media.digikey.com/pdf/Data%20Sheets/Winbond%20PDFs/W25Q16BV.pdf
« Last Edit: April 08, 2015, 02:57:20 pm by zapta »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf