ESP8266启动失败,打印乱码,仅重烧系统参数区文件esp_init_data_default.bin后ok,难道参数被改写了?

miles
Posts: 9
Joined: Thu May 25, 2017 10:46 am

ESP8266启动失败,打印乱码,仅重烧系统参数区文件esp_init_data_default.bin后ok,难道参数被改写了?

Postby miles » Thu Aug 31, 2017 11:49 am

ESP8266一开始运行正常,后来突然发现wifi通信异常(此时路由器是好的),ESP8266无法连接上路由器了!!!
于是用户对ESP8266进行按键恢复出厂设置,也就是调用了system_restore()函数,之后就发现ESP8266启动失败,无法响应任何外部事件,包括按键,之后重烧系统参数区文件esp_init_data_default.bin后启动成功,请问系统参数区内容会影响启动打印吗?在什么情况下系统参数区的内容会被改写成无效值?谢谢!

查看串口打印如下:
[15:00:00.180] ets Jan 8 2013,rst cause:2, boot mode:(3,6)
[15:00:00.200]
[15:00:00.200] load 0x40100000, len 816, room 16
[15:00:00.220] tail 0
[15:00:00.220] chksum 0x8d
[15:00:00.220] load 0x3ffe8000, len 788, room 8
[15:00:00.220] tail 12
[15:00:00.220] chksum 0xcf
[15:00:00.220] ho 0 tail 12 room 4
[15:00:00.220] load 0x3ffe8314, len 288, room 12
[15:00:00.220] tail 4
[15:00:00.220] chksum 0xcf
[15:00:00.241] csum 0xcf
[15:00:00.241]
[15:00:00.241] 2nd boot version : 1.2
[15:00:00.241] SPI Speed : 40MHz
[15:00:00.241] SPI Mode : QIO
[15:00:00.241] SPI Flash Size : 16Mbit
[15:00:00.241] jump to run user1
[15:00:00.241]
[15:00:00.241] ⑷kzY-吰P档1叕当玪 =r盭+墾v粃盄珸,P1Y*P噈p佗挟|鑭r嚝9醨z!楫pk ip|囮血ㄙ*P~p棲谚N竍r≈氕[a鵭P -rX━疿% R沨8at嚚P +旦
[15:00:01.050] ar媂~|P叏蝰h ct|﹔莕5※(`{x哩vhr噈 *r贡角/@*rP北暴rP北暴﹔p盤北盝(vr盤北眽@*r吥P钡盞韙r@轾.)血o8a 闕*盩北┅腜▇鵫綁鴑zAl )閙~盭'!Pt盄陓奖@睐*眽鴑zA瑝8x簐A,r'!ˋ~An 晟*盧礏┅腜@睐*ⅳh壐x簐A,r'醨1*NX…轾.r当@鑒晇 倒夅hb壯*! 祽錘鑒嵣-Ae当%i癣囝~灯P转R Ⅻ⑷肓(z吰P档眳鲍l %jr盭+墾v粃q-盄珸琍眮-P噈p佗挟|鑭r嚝9醨z¢畃k ip|囮血!K╕*P~p棲谚N竍r≈k璠狴jP -rX━庄XR沨8at嚚P +旦
[15:00:01.840] ar媂-麀|P叏r駂 ct|﹔莕5※(`{xvhr噈 *r贡角/@*rP北﹔P北暴﹔p盤北盝(vr盤北眽@*r吥P钡盞韙r篆@轾.┭Ko8a 晟*盩北暴┠P饱▇鵫綁鴑zAl )閙~盭'!Pt盄j|=盄睐*夬nzA瑝8x簐A,r'!(A{~A晟*盧礏┅腜@睐*ⅳhq(x簐A,r'醨NX…囬r当@b晇 倒夅鑒壯* 〉戝N桠嵣-Aea*当%i癣鄋~灯凶猂 Ⅻ⑷k侉z吰P档眳当玪 %jr盭+墾v粃盄珸琍眮-P噈p佗挟|鑭r嚝9醨z¢畃k ip|囮血╕*P~p棲谚N竍r≈k璠狴jP -rX━庄XR沨8at嚚P +旦ar媂-麀|P叏r駂 ct|﹔n怠`鹸v鑢噈 *r贡角/@*rP北暴﹔P北*at嚚P +盝(vr盤北@*r吥P1当Kmt%dr@轾.┭薿8a 晟*盩北暴┠P饱▇鵫綁鴑zAl )閙~盭'!y(Pt盄j|奖@睐*眽鴑zAx簐A,r'!(A,嗀n 晟*盧礏┅腜爽@睐*ⅳh8x簐A,r'arNX…囬r当@鑒v 倒夅鑒壯* 〉戝N鑒嵣-Ae当%i癣鄋哩~灯P转R Ⅻ"萲z吰P5当叕当玪 %jr盭+ ╲粃盄珸琍眮-P噈p佗P畖h|r嚝9醨z¢畃k 閜|囮血ㄙ*P
[15:00:02.358] ~p棲谚N竍=rk璠a鵭P 璻X━*at嚚P +旦
[15:00:03.050] "壗"ar媂~|P叏r駂 ct|﹔莕怠`{xvhr噈 *r贡角/@*rP北暴﹔P北暴﹔鸨P北盝(v虮P北夬猺腜钡盞韙r@轾.┭Ko8a 晟*盩1北)┠P饱▇鵫=夬nzAl )閙~盭'!Pt,盄j|奖@睐*眽鴑zA瑝8x簐A,r'!(A{~An 晟*盧礏┅腜@睐*ⅳhx簐A,r'醨NX瓏轾.r当@桠晇倒夅b  〉戝N鑒嵣-Ae当%i癣鄋~灯P转R Ⅻ⑷kY(z匜P档眳鲍l %jr盭+墾v粃@珸P眮-P噈p佗挟|鑭r嚝9醨z¢畃k ip|囮血ㄙ*P~p棲谚N8brk璠a鵭P -rX━庄XR沨8at嚚P +旦
[15:00:04.177]
[15:00:04.177] ets Jan 8 2013,rst cause:2, boot mode:(3,7)
[15:00:04.177]
[15:00:04.177] load 0x40100000, len 816, room 16
[15:00:04.220] tail 0
[15:00:04.220] chksum 0x8d
[15:00:04.220] load 0x3ffe8000, len 788, room 8
[15:00:04.220] tail 12
[15:00:04.220] chksum 0xcf
[15:00:04.220] ho 0 tail 12 room 4
[15:00:04.220] load 0x3ffe8314, len 288, room 12
[15:00:04.220] tail 4
[15:00:04.220] chksum 0xcf
[15:00:04.220] csum 0xcf
[15:00:04.220]
[15:00:04.220] 2nd boot version : 1.2
[15:00:04.220] SPI Speed : 40MHz
[15:00:04.240] SPI Mode : QIO
[15:00:04.240] SPI Flash Size : 16Mbit
[15:00:04.240] jump to run user1
[15:00:04.240]
[15:00:04.240] ⑷kz吰P档眳鲍%jr盭+墾v粃盄珸琍眮-P噈p挟|鑭r嚝9醨z楫pk ip|囮血∷ㄙ*P法~5%p棲谚N竍r≈k璠a鵭P -rX━庄XR沨8at嚚P +旦
[15:00:05.050] ar媂~|P叏r駂 ct|﹔莕怠`{xvhr噈 *r贡角/@*rP北暴rP北暴﹔鸨P北盝(v虮P北眽@猺吥P钡盞韙r@轾.┭Ko8a 晟*1T北┅腜1エ~鵫綁鴑zAl )閙~盭'!Pt盄j|奖@韞*眽鴑zA8x忽A,r'!y((A{~An 晟*盧礏)┠P@睐*ⅳ蝰(x簐A,r'醨NX…囬r当@鑒晇 倒夅b壯*〉戝N鑒
Ae当%i癣鄋~灯P转R Ⅻ⑷kz吰P档眳鲍%jr盭+墾v粃盄珸琍眮-P噈p佗挟|鑭r嚝9醨z畃k ip|囮Q栓P法~5%p棲谚N竍r≈k璠a鵭P -rX━庄XR沨8at嚚P +
[15:00:06.049] ar媂~|P叏蝰h ct|﹔莕怠`{x哩vhr噈 *r贡角/@*rP北暴rP北暴﹔p盤北盝(vr盤北眽@*r吥P钡盞韙r@轾.┭Ko8a 晟*盩1北┅腜饱▇鵫綁鴑zAl )閙~盭'!Pt盄j|奖@睐*鴑zA瑝竫簐A,r'!(A~An 晟*盧礏┅腜@睐*ⅳhx簐A,r'狎NX…轾.r当@鑒晇 倒夅b壯* 戝N鑒嵣-Ae当%i癣鄋~灯P转R Ⅻ⑷kz吰P档眳鲍l %jr盭+墾v粃@珸琍眮-P噈p挟|鑭璅r嚝9醨z¢畃k ip|囮血∷ㄙ*P法~p棲谚N竍r謐璠a鵭P -rX━庄XR沨8at≒ +
[15:00:06.839] "壗"%ar媂~|P叏r駂 ct|﹔莕怠`{(vhr噈 *r迸-角/@*rP北暴﹔P北暴﹔p盤北盝(vr盤北眽@*r吥P钡盞韙r@轾.┭Ko8a 闕*盩北暴┠P饱▇鵫綁鴑zAl )閙~盭'!Pt盄j|奖@睐*眽鴑zA瑝竫簐A,r'!ˋ{~An 晟*盧礏┅腜@睐*ⅳhx簐A,r'狎1*NX…轾.r当@鑒晇 箟幄@hb壯*! 祽錘鑒嵣-Ae当%i癣鄋~灯P转R Ⅻ⑷kA(z吰P档鲍l %jr盭+墾v粃盄珸琍眮-P噈p佗挟|鑭璅r嚝9醨z¢畃k ip泑囮血ㄙ*P~p棲谚N竍r≈k-[a鵭P -rX━庄XR沨8atP +旦ar媂~|P叏蝰h ct|r莕怠`{x哩vhr噈 *r贡角/@*rP北暴﹔,Pat嚚P +旦北J(vr盤北眽@*r吥P钡盞韙r@轾.┭Ko8a 晟*盩北暴┠P饱▇鵫綁鴑zAl )閙~盭'※(Pt盄j|奖@睐*眽鴑zA瑝8vA,r'!(A{~An 晟*盧5B┅腜@韞*眿ⅳhx簐A,r'醨NX!瓏轾.=ry+当@"@鑒晇 夅鑒壯* 〉戝N鑒岻-Ae当%i癣鄋~灯P转R Ⅻ⑷kz吰P档眳鲍%jr盭+墾v粃盄珸琍眮-P噈p佗挟|鑭r嚝9醨z畃k ip|囮QKㄙ*P
[15:00:07.365] (~5%p棲谚N竍r≈k璠a鵭P -r*at嚚P +旦
[15:00:08.179]

Her Mary
Posts: 384
Joined: Mon Oct 27, 2014 11:09 am

Re: ESP8266启动失败,打印乱码,仅重烧系统参数区文件esp_init_data_default.bin后ok,难道参数被改写了?

Postby Her Mary » Wed Sep 06, 2017 10:18 am

你的 flash 是 16Mbit 的,那么在编译 user1.bin 时,你是匹配选择的 16Mbit 的编译方式吗?

miles
Posts: 9
Joined: Thu May 25, 2017 10:46 am

Re: ESP8266启动失败,打印乱码,仅重烧系统参数区文件esp_init_data_default.bin后ok,难道参数被改写了?

Postby miles » Wed Sep 06, 2017 11:05 am

编译烧录时选的都是16MBit的,但这不是重点,重点是这个问题不是在烧录user1.bin之后出现的,而是运行过程中出现的。

ESP_Faye
Posts: 1641
Joined: Mon Oct 27, 2014 11:08 am

Re: ESP8266启动失败,打印乱码,仅重烧系统参数区文件esp_init_data_default.bin后ok,难道参数被改写了?

Postby ESP_Faye » Wed Sep 06, 2017 11:28 am

您好,

您可以查证您的应用程序中,是否有写 flash 的操作,是否写错了位置,改写了系统参数区。

感谢您对 ESP8266 的关注!

miles
Posts: 9
Joined: Thu May 25, 2017 10:46 am

Re: ESP8266启动失败,打印乱码,仅重烧系统参数区文件esp_init_data_default.bin后ok,难道参数被改写了?

Postby miles » Thu Sep 07, 2017 8:16 pm

虽然我代码支持远程升级,但是写flash操作的位置没有问题,远程升级的功能验证过很多次,且出现问题时,我并没有进行任何远程升级的操作。

但我代码中调用了system_restore()类似操作,代码中还有smartconfig的操作,这些操作应该会影响系统参数区吧。

我现在怀疑这些操作在意外条件下(比如电压不稳,供电不足等)会导致系统参数区内容丢失。系统参数区应该没有备份和校验机制或者该类机制在特定条件下失效了。

Who is online

Users browsing this forum: No registered users and 8 guests