With an ESP32S3 board (PowerFeather) the following code sometimes poweron-resets instead of waking up properly:
Code: Select all
extern "C" void app_main()
{
ets_delay_us(1000*1000);
ets_printf("wakeup_cause=%d reset_reason=%d\n", esp_sleep_get_wakeup_cause(), esp_reset_reason());
esp_sleep_enable_timer_wakeup(500*1000);
esp_deep_sleep_start();
Below is the output (out of idf.py monitor, which obviously disconnects/reconnects during deep sleeps): I have added some "**" to highlight some reset reasons to be a poweron-reset rather than deep sleep wakeup.
I have tried to disable the brownout detection in sdkconfig as it was mentioned in other posts, but it does not help for me.
I am using ESP-IDF v5.1.4 due to compatibility constraints.
Would you please have any idea to get rid of these poweron-resets?
Many thanks!
Code: Select all
...
I (322) main_task: Calling app_main()
wakeup_cause=0 reset_reason=0
--- Error: read failed: [Errno 6] Device not configured
--- Waiting for the device to reconnect.
wakeup_cause=4 reset_reason=8
--- Error: read failed: [Errno 6] Device not configured
--- Waiting for the device to reconnect.
wakeup_cause=4 reset_reason=8
--- Error: read failed: [Errno 6] Device not configured
--- Waiting for the device to reconnect.
**wakeup_cause=0 reset_reason=1**
--- Error: read failed: [Errno 6] Device not configured
--- Waiting for the device to reconnect.
wakeup_cause=4 reset_reason=8
--- Error: read failed: [Errno 6] Device not configured
--- Waiting for the device to reconnect.
wakeup_cause=4 reset_reason=8
--- Error: read failed: [Errno 6] Device not configured
--- Waiting for the device to reconnect.
wakeup_cause=4 reset_reason=8
--- Error: read failed: [Errno 6] Device not configured
--- Waiting for the device to reconnect.
wakeup_cause=4 reset_reason=8
--- Error: read failed: [Errno 6] Device not configured
--- Waiting for the device to reconnect.....
...