Skip to content

ESP32: deep sleep modes #13365

@nicoHarel

Description

@nicoHarel

Description

I've noticed RIOT OS is not yet compatible with deep sleep modes on ESP32 and more generally on all ESPs. Unless I'm wrong, the only "energy saving" mechanism available consists in reducing the MCU frequency to 80MHz (which is the default clock on RIOT OS if I'm not mistaken).

At that frequency, most ESP boards current consumption is still around at least 30mA, which is unacceptable for most low energy applications. This is a decisive flaw for me as I need my ESP to draw less than a mA most of the time.

I've tried in a hurry to implement it myself, adding the right files (sleep_modes.c...) containing the functions definition needed (esp_deep_sleep_start...) but without success. It seems the ESP-IDF version used by RIOT OS is too old and still uses the ancient C way of defining a function without arguments (no void inside the parenthesis). GCC doesn't like that any more.

So the ESP-IDF need updating but doing so would have repercussions on the ESPs implementation in RIOT OS.

Proposition

  • Evaluate the impact of updating to a more recent version of the ESP-IDF.

  • If it doesn't seem to break absolutely everything about the ESP implementation, change the ESP-IDF tagged version in a branch and work from there.

  • Then implement the deep sleep functions inside RIOT OS.

Metadata

Metadata

Assignees

Labels

Area: pmArea: (Low) power managementPlatform: ESPPlatform: This PR/issue effects ESP-based platformsState: staleState: The issue / PR has no activity for >185 daysType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions