esp-idf: Sleep mode doesn't work (IDFGH-6346)

Environment

  • Module or chip used: ESP32-WROVER-E
  • IDF version (run git describe --tags to find it): v4.4-dev-3565-g697f829d60
  • Build System: Make
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it): build it via docker(espressif/idf@sha256:bdcb958b9fc25a4109f2c18b9569adaae0d81abac03dd4dcf02983fd857fabc8)
  • Operating System: Linux
  • Using an IDE?: No
  • Power Supply: [USB|external 5V|external 3.3V|Battery]

Problem Description

ESP32 doesn’t wake up from sleep mode if RTC clock source is set like an Internal 8.5MHz oscillator, divided by 256

Expected Behavior

I expect the ESP32 to wake up 5 seconds after running this test code.

Actual Behavior

ESP32 doesn’t wake up(((

Steps to reproduce

Set RTC clock source: menuconfig->Component config->ESP32-specific->RTC clock source: Internal 8.5MHz oscillator, divided by 256 and flash the code from the section below.

Code to reproduce this issue

#include <stdio.h>
#include "sdkconfig.h"
#include "esp_log.h"
#include <esp_sleep.h>

extern "C" {
void app_main();
}

void app_main(void)
{
    esp_deep_sleep(5000000);
}

I think the problem occurs due to this commit: https://github.com/espressif/esp-idf/commit/73384adfbe3a4365fb8fefdae9b1f9df4e509635 If I remove lines or set RTC source like internal 160kHz RC oscillator. The test code is correctly working.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 22 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Hi guys, this patch does not work for ESP32S3 see https://github.com/espressif/esp-idf/issues/11362