-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ESP32: deep sleep modes #13365
Description
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.