NodeMCU reseting after 6 hours

Thread Starter

ddads

Joined Nov 13, 2017
5
Hi,
I'm in a project with my nodemcu (ESP-12), it has 3 sensor (a DHT-22, a MQ-2 and a k thermocouple) and a spi oled display. Every minute it reads the sensors and sends to a server.
It works fine, however every 6h 25min(+/-) it resets without any apparently reason.
I have some error messages:

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

ctx: sys
sp: 3ffffda0 end: 3fffffb0 offset: 01a0

>>>stack>>>
3fffff40: 3fffdcc0 000002f4 3ffee190 401004f4
3fffff50: 4023f62b 00000a46 3ffee190 40107278
3fffff60: 3ffe9f48 00000008 00000a46 40217dc6
3fffff70: 40218200 65c871e8 40218263 000000af
3fffff80: 40218ad7 40218bae 60000600 3ffee190
3fffff90: 3fffdcc0 00000000 40000f65 3fffdab0
3fffffa0: 00000000 0000172a 3fffdab0 40000f49
<<<stack<<<

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

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld
ø

>>>>> Here is the stack decoded: <<<<<

0x401004f4: calloc at C:\Users\ddadsx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\umm_malloc/umm_malloc.c line 1684
0x4023f62b: pm_set_sleep_mode at ?? line ?
0x40107278: pvPortZalloc at C:\Users\ddadsx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/heap.c line 33
0x40217dc6: pm_set_sleep_time at ?? line ?
0x40218200: pm_get_sleep_type at ?? line ?
0x40218263: pm_get_sleep_type at ?? line ?
0x40218ad7: LightSleepWakedCbSetFunc at ?? line ?
0x40218bae: LightSleepWakedCbSetFunc at ?? line ?

Sometimes it gives me other stacks, the decoded lines are below:

0x401004f4: calloc at C:\Users\ddadsx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\umm_malloc/umm_malloc.c line 1684
0x40105942: ets_timer_setfn at ?? line ?
0x40107278: pvPortZalloc at C:\Users\ddadsx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/heap.c line 33
0x40105886: wdt_feed at ?? line ?
0x40217dc6: pm_set_sleep_time at ?? line ?
0x40229a1c: ets_timer_handler_isr at ?? line ?
0x40218286: pm_get_sleep_type at ?? line ?
0x40229a42: ets_timer_handler_isr at ?? line ?
0x4021947f: pm_post at ?? line ?
0x4020e58b: loop_task at C:\Users\ddadsx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/core_esp8266_main.cpp line 56

and

0x401004f4: calloc at C:\Users\ddadsx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\umm_malloc/umm_malloc.c line 1684
0x40107278: pvPortZalloc at C:\Users\ddadsx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/heap.c line 33
0x40217dc6: pm_set_sleep_time at ?? line ?
0x40105b14: ets_timer_arm_new at ?? line ?
0x40218286: pm_get_sleep_type at ?? line ?
0x40218333: pm_get_sleep_type at ?? line ?
0x40218248: pm_get_sleep_type at ?? line ?
0x40201018: delay_end at C:\Users\ddadsx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/core_esp8266_wiring.c line 40
0x402299fd: ets_timer_handler_isr at ?? line ?
0x40229a42: ets_timer_handler_isr at ?? line ?
0x4020e58b: loop_task at C:\Users\ddadsx\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/core_esp8266_main.cpp line 56

-------------------------------
I'm sorry about the long post.
 

Thread Starter

ddads

Joined Nov 13, 2017
5
rst cause:2, boot mode:(3,7) means that the reset cause was the reset pin and the boot mode is the normal flash startup (according to the documentation http://www.esp8266.com/viewtopic.php?p=2096#p2112).
But the reset cause isn't right because I place a pullup resistor between the rst pin and Vcc (It's active when low).
The strange part is the frequency of the resets, every 6,5h.
 

Thread Starter

ddads

Joined Nov 13, 2017
5
There is a physical button connected to this pin as well, and even if I click it, it doesn't restart because of the pullup resistor.
Although if I take the resistor out, the button works normally.
 

moffy

Joined Nov 13, 2017
11
Calloc seems to be common to your stacks. Do you have a memory leak/corruption? Running out of stack or global memory space.
 
Top