ESP8266 Developer Zone The Official ESP8266 Forum 2017-07-19T07:15:02+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1664 2017-07-19T07:15:02+08:00 2017-07-19T07:15:02+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=14643#p14643 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]>
Any ideas? I can't see a fix incorporated anywhere.

Statistics: Posted by scargill — Wed Jul 19, 2017 7:15 am


]]>
2016-04-09T17:22:03+08:00 2016-04-09T17:22:03+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=6391#p6391 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]> Statistics: Posted by rab — Sat Apr 09, 2016 5:22 pm


]]>
2016-04-07T15:16:26+08:00 2016-04-07T15:16:26+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=6381#p6381 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]>
The TCP window is 4 x MSS = 4 x 1460 = 5840 > 4096 (Sector size).
So the received data length may be larger than the sector size.

Thanks for your interest in ESP8266 !

Statistics: Posted by ESP_Faye — Thu Apr 07, 2016 3:16 pm


]]>
2016-04-06T21:28:30+08:00 2016-04-06T21:28:30+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=6371#p6371 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]>
To test further I created interference at the RF level to try and affect the internal working of the receive and was successful in causing these large packets to occur more frequently (still all 5744 though, odd!). This allowed me to confirm the problem and the fix.

Thank you very much for your help. I'll update rBoot and get some users to test it for real. If you can shed some light on why it's just started happening after v1.5.1 and a bit more on the inner workings of the network stack that would be interesting.

Statistics: Posted by rab — Wed Apr 06, 2016 9:28 pm


]]>
2016-04-06T18:30:38+08:00 2016-04-06T18:30:38+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=6367#p6367 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]>
In your reboot-ota.c, flash_write_flash function

Code:

   if (len > SECTOR_SIZE) {
      // to support larger writes we would need to erase current
      // (if not already done), next and possibly later sectors too
   } else {
      // check if the sector the write finishes in has been erased yet,
      // this is fine as long as data len < sector size
      if (status->last_sector_erased != (status->start_addr + len) / SECTOR_SIZE) {
         status->last_sector_erased = (status->start_addr + len) / SECTOR_SIZE;
         spi_flash_erase_sector(status->last_sector_erased);
      }
   }


You need to deal with the situation that "len > SECTOR_SIZE", otherwise, it will cause the problem.

Statistics: Posted by ESP_Faye — Wed Apr 06, 2016 6:30 pm


]]>
2016-04-06T18:12:07+08:00 2016-04-06T18:12:07+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=6366#p6366 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]> Tony

Statistics: Posted by spants — Wed Apr 06, 2016 6:12 pm


]]>
2016-04-02T17:11:47+08:00 2016-04-02T17:11:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=6318#p6318 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]> not fixed. I still get intermittent bad flashes with the test application on github when using the new library.

Richard.

Statistics: Posted by rab — Sat Apr 02, 2016 5:11 pm


]]>
2016-03-23T17:31:57+08:00 2016-03-23T17:31:57+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=6195#p6195 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]>
Please have a try with the attachment based on ESP8266_NONOS_SDK_V1.5.2.

If your problem is still unsolved, please feel free to let us know.
libmain_for_ESP8266_NONOS_SDK_V1.5.2.zip

Statistics: Posted by ESP_Faye — Wed Mar 23, 2016 5:31 pm


]]>
2016-03-23T09:12:38+08:00 2016-03-23T09:12:38+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=6191#p6191 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]> Statistics: Posted by giox — Wed Mar 23, 2016 9:12 am


]]>
2016-03-08T05:29:52+08:00 2016-03-08T05:29:52+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=6025#p6025 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]>
I wrote my own simpler test app to see if I can repro it with that. I can't so far. The key different being my test app isn't doing anything active with the network, so not drawing as much power.

Statistics: Posted by piersfinlayson — Tue Mar 08, 2016 5:29 am


]]>
2016-03-05T20:02:22+08:00 2016-03-05T20:02:22+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=5981#p5981 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]> Statistics: Posted by rab — Sat Mar 05, 2016 8:02 pm


]]>
2016-02-14T04:53:06+08:00 2016-02-14T04:53:06+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=5738#p5738 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]>
//Henrik Pedersen

Statistics: Posted by henkep — Sun Feb 14, 2016 4:53 am


]]>
2016-02-14T04:09:01+08:00 2016-02-14T04:09:01+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=5737#p5737 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]> Statistics: Posted by rab — Sun Feb 14, 2016 4:09 am


]]>
2016-02-14T04:07:10+08:00 2016-02-14T04:07:10+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=5736#p5736 <![CDATA[Re: Bad flash writes with v1.5.1+ (increased power usage???)]]> https://github.com/raburton/flashwritebug
Instruction are in the readme.txt
I have tested the code with the new v1.5.2 sdk and the bug is still there. The flash write gets blocks of 0xff bytes (I assume these are erased, but not rewritten) in the middle of the file. This seems to happen on any sustained write, so I assume it will affect the sdk bootloader ota write just as much as as rBoot ota.

Richard.

Statistics: Posted by rab — Sun Feb 14, 2016 4:07 am


]]>
2016-01-25T17:59:01+08:00 2016-01-25T17:59:01+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=5523#p5523 <![CDATA[Re: Bad flash writes with v1.5.1 (increased power usage???)]]>
Sorry that we could not duplicate your problem, could you provide your test code for debugging ?

Statistics: Posted by ESP_Faye — Mon Jan 25, 2016 5:59 pm


]]>
2016-01-22T00:39:51+08:00 2016-01-22T00:39:51+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1664&p=5479#p5479 <![CDATA[Bad flash writes with v1.5.1 (increased power usage???)]]>
I have seen this before when users have not had enough power - too few mA from their power supply - to flash and use wifi at the same time (and the write still does not return an error). Now it is happening on devices that were fine before sdk v1.5.1 so I suspect that the new sdk is using more power than the old version.

To make it worse if you try to read the flash back to check the data is correct, it appears to come from the cache and so it looks fine (but if you use esptool.py to read the flash you can see it is bad). This means it is not possible to check the write worked at all!

Can you advise on how to fix this?

Richard.

Statistics: Posted by rab — Fri Jan 22, 2016 12:39 am


]]>