一段时间后 ESP8266 芯片崩溃

时间:2021-07-05 07:26:26

标签: heap-memory esp8266 arduino-esp8266

我在 ESP8266 中运行一个服务器,当您单击网页中的提交按钮时,该服务器接受参数和值。单击提交按钮的一些迭代后,esp8266 崩溃,异常:

--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Exception (29):
epc1=0x40205224 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

>>>stack>>>

ctx: cont
sp: 3ffffca0 end: 3fffffc0 offset: 0190
3ffffe30:  3fff1598 3fff1598 3ffffe80 4020521f  
3ffffe40:  3fff6354 3ffffe98 3ffffe80 40217ef0  
3ffffe50:  00000003 3ffffec0 3ffffe80 40217f20  
3ffffe60:  3ffffe98 3ffffea4 3fff1588 3fff0da4  
3ffffe70:  00000000 3ffffec0 00000005 402053a9  
3ffffe80:  3fff631c 0029002f 00003a30 3fff6300  
3ffffe90:  0029002f 800001da 3fff6354 0029002f  
3ffffea0:  00000001 3fffbf5c 0005002f 00217d42  
3ffffeb0:  00000001 3fff0dac 3ffffefc 4020cb24  
3ffffec0:  3fff68b4 01da01df 00000000 fffffffe  
3ffffed0:  00000000 3fffc6fc 00000000 3fff1c88  
3ffffee0:  00000000 3fffdad0 40223278 00000000  
3ffffef0:  3ffffefc 3fffff64 3fff0a00 40223428  
3fffff00:  00000000 000003e8 3fffff60 03e87701  
3fffff10:  402583d1 00000004 3fff0d58 4020171a  
3fffff20:  40258677 00000004 3fff0d58 3fff0d5c  
3fffff30:  00000000 4bc6a7f0 0189374b 00000000  
3fffff40:  00000000 00000000 4bc6a7f0 00000000  
3fffff50:  000e001a 00050008 4010051c 0001fc51  
3fffff60:  00000000 6c80e048 4024c800 3ffe8514  
3fffff70:  024bbda9 80000000 00000000 4010059d  
3fffff80:  00000000 00000000 00000001 3fff1cc8  
3fffff90:  3fffdad0 00000000 0001fc51 40211f35  
3fffffa0:  3fffdad0 00000000 3fff1c88 40218fd4  
3fffffb0:  feefeffe feefeffe 3ffe899c 40100f45  
<<<stack<<<

last failed alloc call: 4020521F(100)

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

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

用于调试:在串行监视器中打印空闲堆(使用毫秒每 2 秒运行一次)

 Serial.println(ESP.getFreeHeap());

enter image description here

提交按钮正在发送以下参数和值(仅部分):

http://192.168.4.1?user=1234&password=1234&data1=qwertyuiopasdfghjklzxcvbnm&data1=qwertyuiopasdfghjklzxcvbnm&data2=qwertyuiopasdfghjklzxcvbnm&data3=qwertyuiopasdfghjklzxcvbnm&data4=qwertyuiopasdfghjklzxcvbnm

如您所见,FreeHeap 正在下降,直到达到 ESP8266 无法处理的最小值。

enter image description here

有没有办法在不重启芯片的情况下刷新或重用堆?

safeString 可以帮助解决这个问题吗?

0 个答案:

没有答案