ESP32-deepsleep don't come back with resetreason 5

Posts: 5
Joined: Tue Dec 31, 2019 9:44 am

ESP32-deepsleep don't come back with resetreason 5

Postby Thomas_01 » Sun Jan 05, 2020 10:27 am

I work with a ESP32 and realized a simple temperature sensor. The Power comes from a 18650-Battery. After booting the ESP32 looks for a temperature and if it is the difference big to the last one then it sends a MQTT-Telegramm and then goes to deepsleep. If the temperature is the same like 1 minute before it goes to deepsleep for a minute directly.
After 20 minutes it sends a MQTT-Telegram definitely.

But now the problem: after 1 or 2 days the ESP32 don't wake up. What I found was this. Every 10 or 15 wake ups it comes up with the "reset reason" = 12 . It is "Software reset".
Normally it wakes up with reset reason "5".
My question: why it wakes up with "12" ? And why it goes down completly sometimes.
Here some of the Telegrams:

Code: Select all

2020.01.05 03:59:25 : Nr:45/IP:54-5-14/Wi:-46/WiOK:3/MQTTs:1/Vcc:4.69/Temp:22.25/B1_def:0/B2_def:0/:Zykl./# L:4/57282
2020.01.05 04:03:43 : Nr:46/IP:54-12-12/Wi:-46/WiOK:3/MQTTs:1/Vcc:3.77/Temp:22.50/B1_def:0/B2_def:0/:TDiff/ L:11/57297
2020.01.05 04:23:42 : Nr:47/IP:54-5-14/Wi:-46/WiOK:3/MQTTs:1/Vcc:4.19/Temp:22.25/B1_def:0/B2_def:0/:Zykl./# L:3/57355
2020.01.05 04:43:41 : Nr:48/IP:54-5-14/Wi:-44/WiOK:3/MQTTs:1/Vcc:4.50/Temp:22.13/B1_def:0/B2_def:0/:Zykl./# L:3/57367
2020.01.05 04:46:28 : Nr:49/IP:54-12-12/Wi:-46/WiOK:3/MQTTs:1/Vcc:3.65/Temp:22.25/B1_def:0/B2_def:0/:TDiff/ L:8/57372
2020.01.05 05:06:27 : Nr:50/IP:54-5-14/Wi:-62/WiOK:3/MQTTs:1/Vcc:4.27/Temp:22.00/B1_def:0/B2_def:0/:Zykl./# L:6/57388
2020.01.05 05:26:27 : Nr:51/IP:54-5-14/Wi:-45/WiOK:3/MQTTs:1/Vcc:4.87/Temp:21.94/B1_def:0/B2_def:0/:Zykl./# L:4/57398
2020.01.05 05:46:27 : Nr:52/IP:54-5-14/Wi:-46/WiOK:4/MQTTs:1/Vcc:4.72/Temp:21.87/B1_def:0/B2_def:0/:Zykl./# L:4/57410
2020.01.05 06:06:27 : Nr:53/IP:54-5-14/Wi:-62/WiOK:4/MQTTs:1/Vcc:4.44/Temp:21.81/B1_def:0/B2_def:0/:Zykl./# L:6/57424
2020.01.05 06:26:27 : Nr:54/IP:54-5-14/Wi:-46/WiOK:3/MQTTs:1/Vcc:4.69/Temp:21.75/B1_def:0/B2_def:0/:Zykl./# L:4/57482
2020.01.05 06:46:41 : Nr:55/IP:54-12-12/Wi:-47/WiOK:6/MQTTs:1/Vcc:3.59/Temp:21.87/B1_def:0/B2_def:0/:TDiff/ L:4/57494
2020.01.05 07:04:16 : Nr:56/IP:54-12-12/Wi:-46/WiOK:3/MQTTs:1/Vcc:4.09/Temp:22.69/B1_def:0/B2_def:0/:TDiff/ L:6/57510
2020.01.05 07:24:15 : Nr:57/IP:54-5-14/Wi:-46/WiOK:3/MQTTs:1/Vcc:4.25/Temp:22.94/B1_def:0/B2_def:0/:Zykl./# L:4/57522

now it stops. the Voltage of the 18650-Battery was 3.85V measured with a voltmeter
the significant Character are "IP:54-5-14" or "IP:54-12-12".
IP:54 is the last IP-number. the next numer (5 or 12) is the reset reason fpr cpu 0 and the last number (14 or 12) is the reset number of cpu 1.

In setup() I disabled the brownot detector:

Code: Select all

WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
I hoped it helps - nothing.

The deeplsleep-initialisation:

Code: Select all


esp_sleep_enable_timer_wakeup(sleep_time_intern * uS_TO_S_FACTOR );   //(sec * uS_TO_S_FACTOR);
esp_deep_sleep_start(); // deepsleep ESP32

The wake up with "5" is every 20 minutes. But at undefined times it starts with "12"
Is there a another bottleneck using the deepsleep-process ?
Can someone tell me something about the reset reason 12 ??

Many thanks

Posts: 3937
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-deepsleep don't come back with resetreason 5

Postby ESP_Sprite » Mon Jan 06, 2020 1:22 am

Hard to say. No chance you can capture the serial output when that happens? That might tell you more.

Posts: 5
Joined: Tue Dec 31, 2019 9:44 am

Re: ESP32-deepsleep don't come back with resetreason 5

Postby Thomas_01 » Tue Jan 07, 2020 10:02 am

Hallo, thank you for your answer.
The problem is that it happens only in battery operation. So I have no serial output.
I hoped anyone had the definition when the "12" happens.

I don't believe that this is a power problem, because I think a 18650 battery is stable enough (I hope so).


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 9 guests