Sonoff (ESP8266) stuck on boot - csum err

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mhalak
New user
Posts: 1
Joined: 14 Apr 2017, 16:08

Sonoff (ESP8266) stuck on boot - csum err

#1 Post by mhalak » 12 May 2017, 16:44

Hi everyone.

I tried to flash Sonoff Touch device with esp easy firmware. I had a lot of the devices to flash so with one I did something stupid. After flashing was done I did not wait for the device to finish "after flashing" process, I just unplug it and now it gets stuck during boot with "csum err".

this is boot log:
----------------------------------------------------------
ets Jan 8 2013,rst cause:1, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0xef
csum 0xef
csum err
ets_main.c
----------------------------------------------------------

I tried flashing R147, v2... nothing helped. Is there something I can do to fix it?

Thanks in advance

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Sonoff (ESP8266) stuck on boot - csum err

#2 Post by Shardan » 12 May 2017, 19:33

Hello,

Maybe you should try to erase the flash before reflashing.

There is a 1MB "zero" file in the forum: https://www.letscontrolit.com/forum/vie ... 435#p13435

Another possible way is to use the nodeMCUflasher: http://s6z.de/cms/index.php/homeautomat ... hspeichers

If you're running on linux or if you have python installed on windows you can use the esptool for clearing the flash too.
at least my esptool.exe does not work with this command!

Code: Select all

python esptool.py -p com6 erase_flash
Replace "com6" with the com-port your progger uses.

Regards
Shardan

Addendum: Sometimes it helps to flash a completely other firmware like nodeMCU before reflashing - but i won't give warranty for that ;)
Regards
Shardan

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: Sonoff (ESP8266) stuck on boot - csum err

#3 Post by costo » 17 May 2017, 11:18

mhalak wrote: 12 May 2017, 16:44 Hi everyone.

I tried to flash Sonoff Touch device with esp easy firmware. I had a lot of the devices to flash so with one I did something stupid. After flashing was done I did not wait for the device to finish "after flashing" process, I just unplug it and now it gets stuck during boot with "csum err".

this is boot log:
----------------------------------------------------------
ets Jan 8 2013,rst cause:1, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0xef
csum 0xef
csum err
ets_main.c
----------------------------------------------------------

I tried flashing R147, v2... nothing helped. Is there something I can do to fix it?

Thanks in advance
When using the Arduino IDE for compiling/flashing:

Did you use the ´Generic ESP8285 Module´ as option ?

I got exactly the same error message while accidently using the option ´Generic ESP8266 Module´. When I used the right option flashing went ok, the device cleared it´s memory automatically and booted up with ESPEasy.

LeisureLadi
New user
Posts: 3
Joined: 22 Jul 2017, 22:31

Re: Sonoff (ESP8266) stuck on boot - csum err

#4 Post by LeisureLadi » 22 Jul 2017, 22:54

The Sonoff switch has recently been shipped with a flash chip (PN25F08B), which requires to be flashed in "DOUT" mode. Many contributions in the Internet are misleading here (describing DIO or QIO), since they are based on earlier version of Sonoff equipped with different flash memories. I assume these later ones are cheaper (and slightly slower) than the earlier ones provided. Unfortunately there is even no data sheet for the new ones available in the Internet.

Selecting the "Generic ESP8285" in Arduino IDE works well with this flash memory but you may also continue using "Generic ESP8266" setup with "DOUT" flash mode especially if you intend to upgrade your Sonoff to 4GB. The ESP8285 has got only 1M built-in flash memory, so this setting wouldn't be suitable then.

I have also read lots of discussions about fake FTDI USB-serial converters. Usually, that's my experience, it is not the adapter causing the trouble but rather wrong settings of the programming mode. However, the advice to use a separate power supply may still hold. But it is not the only thing to consider. Even you use an external power supply you may have to add a stabilizing capacitor as near as possible to the Sonoff board. A 47uF to 100uF will do. I attached mine directly to the 4-pin header plug. And with this I could even use my USB-serial converter, since it is able to supply 300 mA, which is enough for programming an ESP8266. Check the manual of your USB-serial converter, how much current it is capable to provice. If it is less than 300 mA, go for a separate power supply but keep the capacitor.

Mike58
New user
Posts: 1
Joined: 29 Jul 2017, 05:34

Re: Sonoff (ESP8266) stuck on boot - csum err

#5 Post by Mike58 » 29 Jul 2017, 05:57

Great info here LeisureLadi. I couldn't figure out why a newly ordered Sonoff switch wouldn't flash. I noticed your post about the PN25F08B flash chip. Sure enough the new unit had this very chip. Changed from DIO to DOUT mode in Arduino IDE and boom....instant programming! Many thanks!
-Mike

raihei
New user
Posts: 3
Joined: 03 Jan 2018, 21:00

Re: Sonoff (ESP8266) stuck on boot - csum err

#6 Post by raihei » 23 Jan 2018, 22:18

Thanks for the information about the "PN25F08B" Flash! This saved my "broken" s20... However the first time I flashed it with the supplied "FlashESP8266.exe" it worked without problems. The second time the device was "broken" until I read your information about this flash type. Has someone an idea why the first flash worked?

photonix
New user
Posts: 1
Joined: 07 Jul 2018, 04:29

Re: Sonoff (ESP8266) stuck on boot - csum err

#7 Post by photonix » 07 Jul 2018, 04:33

LeisureLadi wrote: 22 Jul 2017, 22:54 The Sonoff switch has recently been shipped with a flash chip (PN25F08B), which requires to be flashed in "DOUT" mode. Many contributions in the Internet are misleading here (describing DIO or QIO), since they are based on earlier version of Sonoff equipped with different flash memories. I assume these later ones are cheaper (and slightly slower) than the earlier ones provided. Unfortunately there is even no data sheet for the new ones available in the Internet.

Selecting the "Generic ESP8285" in Arduino IDE works well with this flash memory but you may also continue using "Generic ESP8266" setup with "DOUT" flash mode especially if you intend to upgrade your Sonoff to 4GB. The ESP8285 has got only 1M built-in flash memory, so this setting wouldn't be suitable then.

I have also read lots of discussions about fake FTDI USB-serial converters. Usually, that's my experience, it is not the adapter causing the trouble but rather wrong settings of the programming mode. However, the advice to use a separate power supply may still hold. But it is not the only thing to consider. Even you use an external power supply you may have to add a stabilizing capacitor as near as possible to the Sonoff board. A 47uF to 100uF will do. I attached mine directly to the 4-pin header plug. And with this I could even use my USB-serial converter, since it is able to supply 300 mA, which is enough for programming an ESP8266. Check the manual of your USB-serial converter, how much current it is capable to provice. If it is less than 300 mA, go for a separate power supply but keep the capacitor.
I also search "PN25F08 + sonoff" and end up here. Thank LeisureLadi about your warning.
Using google search, there is no way to find the datasheet of PN25F08 (I don't know why). Just try using Bing, and I found the PN25F08 datasheet from XTX (a Chinese company):
http://www.xtxtech.com/upfile/2016082517095182.pdf
I would like to share here to contribute to the community.

Thank you!

poubelle
New user
Posts: 1
Joined: 27 Oct 2018, 17:10

Re: Sonoff (ESP8266) stuck on boot - csum err

#8 Post by poubelle » 27 Oct 2018, 17:31

Hi,
Thank you very much, now I understand why 3 of my 5 esp8266, recently received, didn't work.
To know what is inside, I found a sketch here : https://www.reddit.com/r/esp8266/commen ... available/
Flashing in DIO, I could see that the flash chip is "Flash chip Id: 001640EF..." can be flashed in QIO
or "Flash chip Id: 001640C8..." can be flashed only in DIO
With our information, I have 3 esp8266 more. Thanks a lot..

alexleonov
New user
Posts: 1
Joined: 20 Apr 2020, 03:08

Re: Sonoff (ESP8266) stuck on boot - csum err

#9 Post by alexleonov » 20 Apr 2020, 03:12

I only registered here to thank you guys. After banging my head on the wall for the whole day I finally found this topic which allowed me to push through with this problem. "DOUT" was the culprit in my case. Thank you again! :)

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 32 guests