Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deep_sleep not working in all situations (GIT8266O-389) #820

Open
tinu11 opened this issue Jan 25, 2020 · 0 comments
Open

deep_sleep not working in all situations (GIT8266O-389) #820

tinu11 opened this issue Jan 25, 2020 · 0 comments

Comments

@tinu11
Copy link

tinu11 commented Jan 25, 2020

Environment

  • Development Kit:

  • IDF version (git rev-parse --short HEAD to get the commit id.): 456efce

  • Development Env: [VSC]

  • Operating System: [|Ubuntu|]

  • Power Supply: [|external 5V|]

Problem Description

esp_deep_sleep(SLEEP_DURATION_uSECS); in app_main has no effect.

Expected Behavior

the instruction after esp_deep_sleep() should not be executet but the system should rather go into deep sleep and restart after the sleep period.

Actual Behavior

The esp_deep_sleep() call has no effect. Following instructions are executed - no restart.

Also when I start a MQTT app in app_main and when the mqtt event handler calls esp_deep_sleep() after successful publishing a message, then it works as expected,

Steps to repropduce

  1. just run below mentioned app_main
  2. ...

Code to reproduce this issue

#include "esp_log.h"

void app_main(){
ESP_LOGI(TAG, "[APP] Startup..");
ESP_LOGI(TAG, "[APP] Free memory: %d bytes", esp_get_free_heap_size());
ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version());

esp_log_level_set("*", ESP_LOG_VERBOSE);

ESP_LOGI(TAG, "going into deep sleep for 20 sec");
esp_deep_sleep(20000000);
ESP_LOGE(TAG, "It did not work");

}

Debug Logs

Other items if possible

@github-actions github-actions bot changed the title deep_sleep not working in all situations deep_sleep not working in all situations (GIT8266O-389) Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant