Skip to content

enable CONFIG_RTC_CLK_SRC in arduino IDE to improve deep sleep time accuracy #7084

@Daniel-1276

Description

@Daniel-1276

Related area

additional compile option

Hardware specification

ESP32 and all derivates

Is your feature request related to a problem?

Problem:
not able to set CONFIG_RTC_CLK_SRC in Arduino IDE for battery based applications. Default and hardcoded 150KHz RTC clock in Arduino has very bad time drift, if deep sleep is used for only a couple of hours (in my case + 20min for 15h sleep).

Describe the solution you'd like

Enable CONFIG_RTC_CLK_SRC in Arduino IDE to use for example far better clock option "RTC_CLK_SRC_INT_8MD256" at the cost of only a few µa.

Describe alternatives you've considered

  • Using NTP at the cost of constantly waking up connecting to wifi and correct time drift.
  • Using external clock source like DS1307 or DS3231 at additional hardware and complexity cost.

Additional context

This is an important feature request for all battery powered projects using deep sleep with timer wakeup source.
Source of information on RTC configuration: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/kconfig.html#config-rtc-clk-src

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions