LOOP after installation

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
marci
New user
Posts: 9
Joined: 18 Aug 2017, 20:53

LOOP after installation

#1 Post by marci » 01 Apr 2018, 11:09

Hello,
I'm not new to the ESP8266 world, and I have few controllers installed, Sonoff on all the heating units and few 8266 managing security.

I was planning to do something very simple.... A fresh 8266F12 to be attached to a single relay ... simple and easy.
I took one new 8266F12 and soldered to the base. The base has two integrated resistors linking channel selec to Positive and gpio15 to ground. I linked only RX TX GPIO4 and 5 plus Power and ground.

I erase the chip:

Code: Select all

C:\Python27\Scripts>..\python esptool.py --port COM5 erase_flash
esptool.py v1.2.1
Connecting...
Running Cesanta flasher stub...
Erasing flash (this may take a while)...
Erase took 3.5 seconds
And then flashed the chip with the latest release of MEGA from the site

Code: Select all

C:\Python27\Scripts>..\python esptool.py --port COM5 write_flash -fs detect -fm dio 0 d:\esp8266\ESPEasy-bin\ESP_Easy_mega-20180331_normal_ESP8266_4096.bin
esptool.py v1.2.1
Connecting...
Auto-detected Flash size: 16m
Running Cesanta flasher stub...
Flash params set to 0x0230
Writing 589824 @ 0x0... 589824 (100 %)
Wrote 589824 bytes at 0x0 in 51.3 seconds (92.0 kbit/s)...
Leaving...
When I restarted the Chip DISASTER !!!

Code: Select all

~ld<LF>ªU<LF><LF><CR>INIT : Booting version: v2.0-20180217
INIT : Warm boot #35
FS   : Mounting...
FS   : Mount failed
FS   : Mount failed
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 3
RESET: Too many resets, protecting your flash memory (powercycle to solve this)
FS   : Error while reading/writing config.dat in 954
<LF>PID:0
Version:0
INIT : Incorrect PID or version!
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 3
RESET: Too many resets, protecting your flash memory (powercycle to solve this)

Exception (0):
epc1=0x40106f19 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont 
sp: 3fff4340 end: 3fff45b0 offset: 01a0

>>>stack>>>
3fff44e0:  0000001c 00000000 3fff34bc 401004d8  
3fff44f0:  3fff34bc 0000004e 3fff5e04 40205de9  
3fff4500:  00000000 00000001 0000011c 4010020c  
3fff4510:  0000001c 00000000 3fff34bc 00000000  
3fff4520:  0000001c 00000000 3fff34bc 4020176c  
3fff4530:  00000001 3fff4608 00000000 40203df3  
3fff4540:  3fffdad0 3fff34bc 3fff5e04 3fff357c  
3fff4550:  3fffdad0 3fff34bc 3fff2290 40214e91  
3fff4560:  3fffdad0 3fff34bc 3fff2290 40239c2c  
3fff4570:  00000000 00000000 00000000 3fff5e14  
3fff4580:  0000002f 00000014 feefeffe feefeffe  
3fff4590:  3fffdad0 00000000 3fff3576 402034d4  
3fff45a0:  feefeffe feefeffe 3fff3590 40205f84  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld<LF>ªU<LF><LF><CR>INIT : Booting version: v2.0-20180217
INIT : Warm boot #36
FS   : Mounting...
FS   : Mount failed
FS   : Mount failed
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 3
RESET: Too many resets, protecting your flash memory (powercycle to solve this)
FS   : Error while reading/writing config.dat in 954
<LF>PID:0
Version:0
INIT : Incorrect PID or version!
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 3
RESET: Too many resets, protecting your flash memory (powercycle to solve this)

Exception (0):
epc1=0x40106f19 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont 
sp: 3fff4340 end: 3fff45b0 offset: 01a0

I tried with other TWO units same story !!!

If install the old 147 version everything is perfect.

What is the problem ??

Thanks for help
Marcello

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden

Re: LOOP after installation

#2 Post by grovkillen » 01 Apr 2018, 11:26

Have you tried latest mega (not today but some days ago).
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 9905
Joined: 01 Sep 2017, 22:13
Location: the Netherlands

Re: LOOP after installation

#3 Post by TD-er » 01 Apr 2018, 23:08

The flash output has a very strange line:
"Auto-detected Flash size: 16m"
Is that 16 Mbit? (2MByte)
Could you try the binary for the 1 MB flash version?
It looks like the config cannot be read.

marci
New user
Posts: 9
Joined: 18 Aug 2017, 20:53

Re: LOOP after installation

#4 Post by marci » 02 Apr 2018, 08:54

It's a 16mbyte i.e. 4MB the standard ESP8266 with 4 Megabyte memory.
I Buy the chip only from Ali and then I solder it to the base. I have done it many time.

The strange is that I installed the old 147 version and it works perfectly !
I tried a V2-dev12 and it doesn't work
and the same apply for the most recent version.

yes the snapshot is from a previous version of V2, but I tried also yesterday' version of MEGA.....

And on three chips ! There has to be something more basic !

tks
Marcello

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden

Re: LOOP after installation

#5 Post by grovkillen » 02 Apr 2018, 09:02

Could you provide a photo of the chip?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 9905
Joined: 01 Sep 2017, 22:13
Location: the Netherlands

Re: LOOP after installation

#6 Post by TD-er » 02 Apr 2018, 11:11

There is a problem with flash chips marked "PUYA".
You could try the "PUYA" build to see if that works.
In short, those chips do not need an erase to write new data to the cell.
Usually you can only change a "1" into a "0" and that property is being used as an optimization for SPIFF, the flash filesystem we're using since the v2.0/mega branch.
If the flash chip does do things different, the optimizations for SPIFF no longer work and thus the filesystem gets corrupt.

The PUYA patch is just that, a dirty work-around and will write much more often to flash, which will wear it out very fast.

marci
New user
Posts: 9
Joined: 18 Aug 2017, 20:53

Re: LOOP after installation

#7 Post by marci » 02 Apr 2018, 11:57

Last edited by marci on 02 Apr 2018, 16:23, edited 1 time in total.

marci
New user
Posts: 9
Joined: 18 Aug 2017, 20:53

Re: LOOP after installation

#8 Post by marci » 02 Apr 2018, 14:51

I don't see any PUYA mark on the Chip !!

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden

Re: LOOP after installation

#9 Post by grovkillen » 02 Apr 2018, 15:06

I don't see any picture.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
budman1758
Normal user
Posts: 303
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: LOOP after installation

#10 Post by budman1758 » 02 Apr 2018, 20:30

I see the pictures. They are -12 type chips with the metal cover. Can't see the actual flash chip.
"The glass is twice as big as it needs to be".

marci
New user
Posts: 9
Joined: 18 Aug 2017, 20:53

Re: LOOP after installation

#11 Post by marci » 14 Apr 2018, 22:10

SOLUTION FOUND !!

During the week-end I had a bit of time to spend to debug this problem.....

It could not be a SW problem because no one else was screaming!
It could not be a HW problem because I had the same problem with three chips!

The problem was in the way the firmware was loaded... and this could link with HW. The righ installation command that solve the problem is

..\python esptool.py --port COM5 -b 57600 write_flash -fs 32m -ff 80m -fm qio 0x00000 d:\esp8266\ESPEasy-bin\ESP_Easy_mega-20180414_normal_ESP8266_4096.bin

so I had to decrease the baud rate and explicitly say the CPU speed and the memory size.

Problem solved. All my three chips are now installed and ready to be deployed

MArcello

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden

Re: LOOP after installation

#12 Post by grovkillen » 15 Apr 2018, 00:09

Thanks for the feedback. Good info!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Who is online

Users browsing this forum: Anthropic Claude Bot [bot] and 12 guests