ESP32S2 board resetting from deep sleep

scottsh
Posts: 12
Joined: Wed Dec 09, 2020 6:58 am

ESP32S2 board resetting from deep sleep

Postby scottsh » Tue Jan 19, 2021 5:14 pm

I have a problem that is stumping me... I have an ESP32S2 board which uses the ESP32S2 WROOM module.

After I put the ESP32S2 into deep sleep, on MOST boards (I've got one magic one that doesn't repro), after a while, the CPU will randomly reset. I've double checked the esp_reset_reason(), and it returns power on (as you can see from the dump below).

My assumptions were that there was either a power problem or something funky on the EN pin. I've put both of them on the scope and I never see ANY drop at all. They're both ROCK solid, even while the problem is reproducing over and over again, so I feel like it isn't that.

One interesting thing is that it seems to take a while the first sleep. It will sleep for 5-30 seconds the first time before resetting, but then after that it happens quite quickly. Sometimes it's immediate, looks like under a second, and sometimes it takes a couple seconds, but never nearly as long as the first time. That kind of makes me think of a charge building up on something, or a capacitor draining and never getting recharged... But for the life of me, I can't figure out what.

There are only a few pins on the ESP32S2-WROOM that are connected:
GPIO0 - Reset circuit
GPIO8 (ADC1_CH7) - Battery voltage divider
GPIO13 - Touch pad (for wakeup)
GPIO18 - Data line to HX711 ADC
GPIO19 - SCK line to HX711 ADC
GPIO20, 21, 26 - RGB lines to an RGB LED (common anode)
GPIO43 (U0TXD) - Serial converter
GPIO44 (U0RXD) - Serial converter
3.3V, GND

The rest of the pins are not connected.
I (5417) Sleep: Enabling timer wakeup, 86400s
I (5517) Sleep: test init: touch pad [13] slp 7546, thresh 754
I (5517) Sleep: Enabling touch pad wakeup
I (5517) Sleep: Entering deep sleep

ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x8
load:0x3ffe6108,len:0x14f4
load:0x4004c000,len:0x9d8
load:0x40050000,len:0x2e34
entry 0x4004c1ec
I (46) boot: ESP-IDF v4.3-dev-1903-g83c3e79d8-dirty 2nd stage bootloader
I (46) boot: compile time 12:35:25
I (46) boot: chip revision: 0
I (47) boot.esp32s2: SPI Speed : 80MHz
I (51) boot.esp32s2: SPI Mode : DIO
I (54) boot.esp32s2: SPI Flash Size : 4MB
I (58) boot: Enabling RNG early entropy source...
I (63) boot: Partition Table:
I (65) boot: ## Label Usage Type ST Offset Length
I (71) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (78) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (84) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (91) boot: 3 factory factory app 00 00 00010000 00100000
I (98) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (104) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (111) boot: 6 fs Unknown data 01 82 00310000 000f0000
I (117) boot: End of partition table
I (121) boot: Defaulting to factory image
I (124) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f000020 size=0x24ddc (151004) map
I (164) esp_image: segment 1: paddr=0x00034e04 vaddr=0x3ffc6930 size=0x03b40 ( 15168) load
I (168) esp_image: segment 2: paddr=0x0003894c vaddr=0x40022000 size=0x00404 ( 1028) load
0x40022000: _WindowOverflow4 at I:/repos/esp-idf-fork/components/freertos/port/xtensa/xtensa_vectors.S:1730

I (169) esp_image: segment 3: paddr=0x00038d58 vaddr=0x40022404 size=0x072c0 ( 29376) load
0x40022404: _coredump_iram_start at ??:?

I (184) esp_image: segment 4: paddr=0x00040020 vaddr=0x40080020 size=0xab1a0 (700832) map
0x40080020: _stext at ??:?

I (331) esp_image: segment 5: paddr=0x000eb1c8 vaddr=0x400296c4 size=0x0d268 ( 53864) load
0x400296c4: rtc_sleep_pd at I:/repos/esp-idf-fork/components/esp_hw_support/port/esp32s2/rtc_sleep.c:50

I (346) esp_image: segment 6: paddr=0x000f8438 vaddr=0x40070000 size=0x0002c ( 44) load
0x40070000: _rtc_code_start at ??:?

I (346) esp_image: segment 7: paddr=0x000f846c vaddr=0x50000000 size=0x01810 ( 6160) load
I (365) boot: Loaded app from partition at offset 0x10000
I (365) boot: Disabling RNG early entropy source...
I (375) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte
I (375) cpu_start: Pro cpu up.
I (429) cpu_start: Pro cpu start user code
I (429) cpu_start: cpu freq: 160000000
I (429) cpu_start: Application information:
I (429) cpu_start: Project name: remote-scale
I (433) cpu_start: App version: 0.0.4.104
I (437) cpu_start: Compile time: Jan 18 2021 12:35:20
I (442) cpu_start: ELF file SHA256: 98e8d8eb49897e92...
I (447) cpu_start: ESP-IDF: v4.3-dev-1903-g83c3e79d8-dirty
I (453) heap_init: Initializing. RAM available for dynamic allocation:
I (460) heap_init: At 3FF9E02C len 00001FD4 (7 KiB): RTCRAM
I (465) heap_init: At 3FFCE9A8 len 0002D658 (181 KiB): DRAM
I (470) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (476) spi_flash: detected chip: generic
I (479) spi_flash: flash io: dio
I (486) cpu_start: Starting scheduler on PRO CPU.
I (487) Sleep: esp_reset_reason=1 Timespent in deep sleep=1106ms
I (487) Sleep: Not a deep sleep reset
I (487) Main: Wake reason=0
Any ideas? Any thoughts about what could be causing it to Reset from deep sleep?

Thanks,

- Scott

Michalpu
Posts: 22
Joined: Sun Jan 24, 2021 1:37 pm

Re: ESP32S2 board resetting from deep sleep

Postby Michalpu » Sun Jan 24, 2021 2:02 pm

Can you share the supply schematic?
Content creator at https://911electronic.com

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32S2 board resetting from deep sleep

Postby chegewara » Sun Jan 24, 2021 7:26 pm

scottsh wrote:
Tue Jan 19, 2021 5:14 pm
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)

I (487) Sleep: esp_reset_reason=1 Timespent in deep sleep=1106ms
I (487) Sleep: Not a deep sleep reset
I (487) Main: Wake reason=0
Look at first line here. Its poweron reset, which is reset button pressed, power shortage etc.
The same info you have from the last logs. Not deep sleep reset, and wake up reason 0, all is giving a clue it is poweron reset.

scottsh
Posts: 12
Joined: Wed Dec 09, 2020 6:58 am

Re: ESP32S2 board resetting from deep sleep

Postby scottsh » Mon Jan 25, 2021 4:29 pm

Sure, no problem. Thanks for taking a look! :)

I've attached screen shots of both the power supply section and also the connections to the ESP32S2-WROOM module.
The correlation that I have noticed is that the lower the power gets, the more frequently it seems to hit this reset. When I have it sampling the touch pad every 15 ticks (~4ma), it seems to be pretty stable. Not perfect, but resets are rare. When I decrease the frequency of the sampling to every 90000 ticks (~110uA), it resets MUCH more often, on most boards. There are a FEW that seem to be petty stable no matter what, which I'm attributing to either part variance or ??
power.png
power.png (7.41 KiB) Viewed 10208 times
module.png
module.png (30.87 KiB) Viewed 10208 times
Once again, thanks for taking a look!

- Scott

boarchuz
Posts: 610
Joined: Tue Aug 21, 2018 5:28 am

Re: ESP32S2 board resetting from deep sleep

Postby boarchuz » Mon Jan 25, 2021 11:59 pm


scottsh
Posts: 12
Joined: Wed Dec 09, 2020 6:58 am

Re: ESP32S2 board resetting from deep sleep

Postby scottsh » Tue Jan 26, 2021 1:52 am

Wow, great find!! Well that certainly made a difference! Yes, I think it's the same issue. I have the same concern as the person at the bottom of that thread, why is it signaling POWERON instead of brownout?

Now it seems to have a new weird behavior... The same code that was sleeping fine and waking up on a touch pad before (when the brownout was still enabled), is now sleeping just great the first time. However, once I touch the touchpad and wake it up, it wakes up great, DSLEEP, reason=touch wakeup, but it reinitializes the touch pad and tries to go back to sleep and just ends up in a VERY fast infinite loop waking up with touch wakeup constantly...

What's strange is that this same code worked fine (from the touchpad wakeup perspective) a minute ago...

main.c:

Code: Select all

#include <string.h>
#include <stdio.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "esp_system.h"
#include "esp_log.h"
#include "driver/rtc_io.h"

#include "sleep.h"

static const char *TAG = "Main";

extern "C" void app_main(void)
{
    int reason = Wakeup();
    
    ESP_LOGI(TAG, "Wake reason=%d", reason);
    GoToSleep();
}
sleep.c:

Code: Select all

// sleep.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_sleep.h"
#include "esp_log.h"
#include "driver/touch_pad.h"
#include "driver/rtc_io.h"
#include "driver/touch_pad.h"
#include "driver/adc.h"
#include "esp_wifi.h"
#include "soc/rtc.h"

static const char *TAG = "Sleep";

static RTC_DATA_ATTR struct timeval sleep_enter_time;

int Wakeup()
{
    struct timeval now;
    gettimeofday(&now, NULL);
    int sleep_time_ms = (now.tv_sec - sleep_enter_time.tv_sec) * 1000 + (now.tv_usec - sleep_enter_time.tv_usec) / 1000;
    
    int cause = esp_sleep_get_wakeup_cause();
    esp_reset_reason_t reset_reason = esp_reset_reason();

    ESP_LOGI(TAG, "esp_reset_reason=%d  Timespent in deep sleep=%dms", reset_reason, sleep_time_ms);

    switch (cause) {
        case ESP_SLEEP_WAKEUP_TIMER: {
            ESP_LOGI(TAG, "Wake up from timer. Time spent in deep sleep: %dms", sleep_time_ms);
            break;
        }
        case ESP_SLEEP_WAKEUP_TOUCHPAD: {
            ESP_LOGI(TAG, "Wake up from touch on pad %d", esp_sleep_get_touchpad_wakeup_status());
            break;
        }
        case ESP_SLEEP_WAKEUP_ULP: {
            ESP_LOGI(TAG, "Wake up from ULP. Time spent in deep sleep: %dms", sleep_time_ms);
            break;
        }

        case ESP_SLEEP_WAKEUP_UNDEFINED:
        default:
            ESP_LOGI(TAG, "Not a deep sleep reset");
    }
    return cause;
}

void GoToSleep() 
{
    /* Initialize touch pad peripheral. */
    touch_pad_init();
    /* Only support one touch channel in sleep mode. */
    touch_pad_config(TOUCH_PAD_NUM13);

    /* Denoise setting at TouchSensor 0. */
    touch_pad_denoise_t denoise = {
        /* The bits to be cancelled are determined according to the noise level. */
        .grade = TOUCH_PAD_DENOISE_BIT4,
        .cap_level = TOUCH_PAD_DENOISE_CAP_L4,
    };
    touch_pad_denoise_set_config(&denoise);
    touch_pad_denoise_enable();

    /* Filter setting */
    touch_filter_config_t filter_info = {
        .mode = TOUCH_PAD_FILTER_IIR_16,
        .debounce_cnt = 1,      // 1 time count.
        .noise_thr = 0,         // 50%
        .jitter_step = 4,       // use for jitter mode.
        .smh_lvl = TOUCH_PAD_SMOOTH_IIR_2,        
    };
    touch_pad_filter_set_config(&filter_info);
    touch_pad_filter_enable();

    /* Set sleep touch pad. */
    touch_pad_sleep_channel_enable(TOUCH_PAD_NUM13, true);
    touch_pad_sleep_channel_enable_proximity(TOUCH_PAD_NUM13, false);

    /* Enable touch sensor clock. Work mode is "timer trigger". */
    touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER);
    touch_pad_fsm_start();
    vTaskDelay(100 / portTICK_RATE_MS);
    /* read sleep touch pad value */
    uint32_t touch_value;
    touch_pad_sleep_channel_read_smooth(TOUCH_PAD_NUM13, &touch_value);
        touch_pad_sleep_set_threshold(TOUCH_PAD_NUM13, touch_value * 0.1); //10%
    ESP_LOGI(TAG, "test init: touch pad [%d] slp %d, thresh %d",
        TOUCH_PAD_NUM13, touch_value, (uint32_t)(touch_value * 0.1));

    uint32_t sleep_time_in_ms = 1000;
    uint32_t touchpad_sleep_ticks = (uint32_t)((uint64_t)sleep_time_in_ms * rtc_clk_slow_freq_get_hz() / 1000);

    uint16_t oldslp, oldmeas;
    touch_pad_get_meas_time(&oldslp, &oldmeas);
    ESP_LOGI(TAG, "oldslp=%d  newslp=%d oldmeas=%d", oldslp, touchpad_sleep_ticks, oldmeas);

    touch_pad_set_meas_time(touchpad_sleep_ticks, 500);

    ESP_LOGI(TAG, "Enabling touch pad wakeup");
    esp_sleep_enable_touchpad_wakeup();

    // Enable timer wake up 
    const uint64_t wakeup_time_sec = 3600*24;         // 1 day
    ESP_LOGI(TAG, "Enabling timer wakeup, %llds", wakeup_time_sec);
    esp_sleep_enable_timer_wakeup(wakeup_time_sec * 1000000);

    esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);

    esp_wifi_stop();
    adc_power_off();
    ESP_LOGI(TAG, "Entering deep sleep\n");
    gettimeofday(&sleep_enter_time, NULL);

    esp_deep_sleep_start();
}
i:\w\sleeponly>idf.py monitor
Executing action: monitor
Choosing default port b'COM3' (use '-p PORT' option to set a specific serial port)
Running idf_monitor in directory i:\w\sleeponly
Executing "C:\Users\scott\.espressif\python_env\idf4.2_py3.7_env\Scripts\python.exe i:\repos\esp-idf-fork\tools/idf_monitor.py -p COM3 -b 115200 --toolchain-prefix xtensa-esp32s2-elf- i:\w\sleeponly\build\remote-scale.elf -m 'C:\Users\scott\.espressif\python_env\idf4.2_py3.7_env\Scripts\python.exe' 'i:\repos\esp-idf-fork\tools\idf.py'"...
←[0;33m--- WARNING: GDB cannot open serial ports accessed as COMx←[0m
←[0;33m--- Using \\.\COM3 instead...←[0m
--- idf_monitor on \\.\COM3 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x4
load:0x3ffe6104,len:0x1868
load:0x4004c000,len:0x1688
load:0x40050000,len:0x20fc
entry 0x4004c324
I (47) boot: ESP-IDF v4.2-dev-2488-gce5608c8f 2nd stage bootloader
I (48) boot: compile time 17:38:09
I (48) boot: chip revision: 0
I (51) boot.esp32s2: SPI Speed : 80MHz
I (56) boot.esp32s2: SPI Mode : DIO
I (60) boot.esp32s2: SPI Flash Size : 4MB
I (65) boot: Enabling RNG early entropy source...
I (70) boot: Partition Table:
I (74) boot: ## Label Usage Type ST Offset Length
I (81) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (89) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (96) boot: 2 factory factory app 00 00 00010000 00100000
I (104) boot: End of partition table
I (108) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f000020 size=0x0cad8 ( 51928) map
I (128) esp_image: segment 1: paddr=0x0001cb00 vaddr=0x3ffc46d0 size=0x02eb0 ( 11952) load
I (131) esp_image: segment 2: paddr=0x0001f9b8 vaddr=0x40024000 size=0x00404 ( 1028) load
0x40024000: _WindowOverflow4 at I:/repos/esp-idf-fork/components/freertos/xtensa/xtensa_vectors.S:1730

I (135) esp_image: segment 3: paddr=0x0001fdc4 vaddr=0x40024404 size=0x00254 ( 596) load
I (144) esp_image: segment 4: paddr=0x00020020 vaddr=0x40080020 size=0x34724 (214820) map
0x40080020: _stext at ??:?

I (197) esp_image: segment 5: paddr=0x0005474c vaddr=0x40024658 size=0x10078 ( 65656) load
I (215) esp_image: segment 6: paddr=0x000647cc vaddr=0x40070000 size=0x0001c ( 28) load
I (216) esp_image: segment 7: paddr=0x000647f0 vaddr=0x50000000 size=0x00008 ( 8) load
I (231) boot: Loaded app from partition at offset 0x10000
I (231) boot: Disabling RNG early entropy source...
I (234) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte
I (241) cpu_start: Pro cpu up.
I (245) cpu_start: Application information:
I (250) cpu_start: Project name: remote-scale
I (255) cpu_start: App version: 1
I (260) cpu_start: Compile time: Jan 25 2021 17:38:05
I (266) cpu_start: ELF file SHA256: 9bdc21c4abeebd43...
I (272) cpu_start: ESP-IDF: v4.2-dev-2488-gce5608c8f
I (278) cpu_start: Single core mode
I (282) heap_init: Initializing. RAM available for dynamic allocation:
I (289) heap_init: At 3FFCA688 len 00031978 (198 KiB): DRAM
I (296) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (302) cpu_start: Pro cpu start user code
I (368) spi_flash: detected chip: generic
I (368) spi_flash: flash io: dio
I (368) cpu_start: Starting scheduler on PRO CPU.
I (372) Sleep: esp_reset_reason=1 Timespent in deep sleep=8ms
I (372) Sleep: Not a deep sleep reset
I (382) Main: Wake reason=0
I (482) Sleep: test init: touch pad [13] slp 21120, thresh 2112
I (482) Sleep: oldslp=15 newslp=90000 oldmeas=500
I (482) Sleep: Enabling touch pad wakeup
I (482) Sleep: Enabling timer wakeup, 86400s
I (492) Sleep: Entering deep sleep

ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x5 (DSLEEP),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x4
load:0x3ffe6104,len:0x1868
load:0x4004c000,len:0x1688
load:0x40050000,len:0x20fc
entry 0x4004c324
I (47) boot: ESP-IDF v4.2-dev-2488-gce5608c8f 2nd stage bootloader
I (47) boot: compile time 17:38:09
I (48) boot: chip revision: 0
I (51) boot.esp32s2: SPI Speed : 80MHz
I (56) boot.esp32s2: SPI Mode : DIO
I (60) boot.esp32s2: SPI Flash Size : 4MB
I (65) boot: Enabling RNG early entropy source...
I (70) boot: Partition Table:
I (74) boot: ## Label Usage Type ST Offset Length
I (81) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (89) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (96) boot: 2 factory factory app 00 00 00010000 00100000
I (104) boot: End of partition table
I (108) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f000020 size=0x0cad8 ( 51928) map
I (128) esp_image: segment 1: paddr=0x0001cb00 vaddr=0x3ffc46d0 size=0x02eb0 ( 11952) load
I (131) esp_image: segment 2: paddr=0x0001f9b8 vaddr=0x40024000 size=0x00404 ( 1028) load
0x40024000: _WindowOverflow4 at I:/repos/esp-idf-fork/components/freertos/xtensa/xtensa_vectors.S:1730

I (135) esp_image: segment 3: paddr=0x0001fdc4 vaddr=0x40024404 size=0x00254 ( 596) load
I (144) esp_image: segment 4: paddr=0x00020020 vaddr=0x40080020 size=0x34724 (214820) map
0x40080020: _stext at ??:?

I (197) esp_image: segment 5: paddr=0x0005474c vaddr=0x40024658 size=0x10078 ( 65656) load
I (215) esp_image: segment 6: paddr=0x000647cc vaddr=0x40070000 size=0x0001c ( 28)
I (215) esp_image: segment 7: paddr=0x000647f0 vaddr=0x50000000 size=0x00008 ( 8)
I (230) boot: Loaded app from partition at offset 0x10000
I (230) boot: Disabling RNG early entropy source...
I (233) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte
I (240) cpu_start: Pro cpu up.
I (244) cpu_start: Application information:
I (249) cpu_start: Project name: remote-scale
I (254) cpu_start: App version: 1
I (259) cpu_start: Compile time: Jan 25 2021 17:38:05
I (265) cpu_start: ELF file SHA256: 9bdc21c4abeebd43...
I (271) cpu_start: ESP-IDF: v4.2-dev-2488-gce5608c8f
I (277) cpu_start: Single core mode
I (282) heap_init: Initializing. RAM available for dynamic allocation:
I (289) heap_init: At 3FFCA688 len 00031978 (198 KiB): DRAM
I (295) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (301) cpu_start: Pro cpu start user code
I (365) spi_flash: detected chip: generic
I (366) spi_flash: flash io: dio
I (366) cpu_start: Starting scheduler on PRO CPU.
I (369) Sleep: esp_reset_reason=8 Timespent in deep sleep=336352ms
I (369) Sleep: Wake up from touch on pad 13
I (379) Main: Wake reason=5
I (479) Sleep: test init: touch pad [13] slp 21357, thresh 2135
I (479) Sleep: oldslp=15 newslp=90000 oldmeas=500
I (479) Sleep: Enabling touch pad wakeup
I (479) Sleep: Enabling timer wakeup, 86400s
I (489) Sleep: Entering deep sleep

ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x5 (DSLEEP),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x4
load:0x3ffe6104,len:0x1868
load:0x4004c000,len:0x1688
load:0x40050000,len:0x20fc
entry 0x4004c324
I (47) boot: ESP-IDF v4.2-dev-2488-gce5608c8f 2nd stage bootloader
I (47) boot: compile time 17:38:09
I (48) boot: chip revision: 0
I (51) boot.esp32s2: SPI Speed : 80MHz
I (56) boot.esp32s2: SPI Mode : DIO
I (60) boot.esp32s2: SPI Flash Size : 4MB
I (65) boot: Enabling RNG early entropy source...
I (70) boot: Partition Table:
I (74) boot: ## Label Usage Type ST Offset Length
I (81) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (89) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (96) boot: 2 factory factory app 00 00 00010000 00100000
I (104) boot: End of partition table
I (108) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f000020 size=0x0cad8 ( 51928) map
I (128) esp_image: segment 1: paddr=0x0001cb00 vaddr=0x3ffc46d0 size=0x02eb0 ( 11952) load
I (131) esp_image: segment 2: paddr=0x0001f9b8 vaddr=0x40024000 size=0x00404 ( 1028) load
0x40024000: _WindowOverflow4 at I:/repos/esp-idf-fork/components/freertos/xtensa/xtensa_vectors.S:1730

I (135) esp_image: segment 3: paddr=0x0001fdc4 vaddr=0x40024404 size=0x00254 ( 596) load
I (144) esp_image: segment 4: paddr=0x00020020 vaddr=0x40080020 size=0x34724 (214820) map
0x40080020: _stext at ??:?

I (197) esp_image: segment 5: paddr=0x0005474c vaddr=0x40024658 size=0x10078 ( 65656) load
I (215) esp_image: segment 6: paddr=0x000647cc vaddr=0x40070000 size=0x0001c ( 28)
I (215) esp_image: segment 7: paddr=0x000647f0 vaddr=0x50000000 size=0x00008 ( 8)
I (230) boot: Loaded app from partition at offset 0x10000
I (230) boot: Disabling RNG early entropy source...
I (233) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte
I (240) cpu_start: Pro cpu up.
I (244) cpu_start: Application information:
I (249) cpu_start: Project name: remote-scale
I (254) cpu_start: App version: 1
I (259) cpu_start: Compile time: Jan 25 2021 17:38:05
I (265) cpu_start: ELF file SHA256: 9bdc21c4abeebd43...
I (271) cpu_start: ESP-IDF: v4.2-dev-2488-gce5608c8f
I (277) cpu_start: Single core mode
I (282) heap_init: Initializing. RAM available for dynamic allocation:
I (289) heap_init: At 3FFCA688 len 00031978 (198 KiB): DRAM
I (295) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM
I (301) cpu_start: Pro cpu start user code
I (365) spi_flash: detected chip: generic
I (366) spi_flash: flash io: dio
I (366) cpu_start: Starting scheduler on PRO CPU.
I (369) Sleep: esp_reset_reason=8 Timespent in deep sleep=382ms
I (369) Sleep: Wake up from touch on pad 13
I (379) Main: Wake reason=5
I (479) Sleep: test init: touch pad [13] slp 21323, thresh 2132
I (479) Sleep: oldslp=15 newslp=90000 oldmeas=500
I (479) Sleep: Enabling touch pad wakeup
I (479) Sleep: Enabling timer wakeup, 86400s
I (489) Sleep: Entering deep sleep
Any ideas?

Thanks,

- Scott

scottsh
Posts: 12
Joined: Wed Dec 09, 2020 6:58 am

Re: ESP32S2 board resetting from deep sleep

Postby scottsh » Thu Jan 28, 2021 8:05 pm

FYI, circling back on this post.

It does appear that the cause of the reset from deep sleep is the brownout detector. The power supply lines look very clean on the scope, so not sure why the brownout detector is triggering, but disabling it does seem to fix the problem.

See details in this thread:

https://www.esp32.com/viewtopic.php?f=13&t=19208

Thanks,

- Scott

Who is online

Users browsing this forum: Google [Bot] and 77 guests