Replies: 1 comment 4 replies
-
The Moddable SDK works well with battery powered products. Our clients have been extremely pleased with the battery life achieved. Note that energy management is not limited to battery power. There are regulations in some parts of the world that require products to enter a low power mode when idle, if when connected to power. There are products built on the Moddable in distribution that do this too. To support optimal energy management, the runtime is designed to only run when there is work to do. This allows the host to take appropriate power saving steps, such as reducing the CPU clock speed or entering light sleep. There are instruments shown in xsbug to help developers monitor for unexpected energy use, such as CPU load and turns (how often the event loop runs). The Moddable SDK does not provide one API for energy management that works across devices. There is work for Silicon Labs parts that is separate from ESP32, for example. These features are different enough across silicon platforms, that we haven't yet found a satisfying way to provide a cross-platform energy management solution. Consequently, much of the energy management is done specific to a project. We continue to explore ideas here and welcome feedback, especially if it is based on real-world experience. Even simple things like reducing the clock speed can have unexpected consequences. On ESP32, for example. the ESP-IDF (at last check) does not update the clocks on peripherals automatically, which causes serial and SPI rates to change with the clock speed. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to understand whether moddable is at all geared towards low power, i.e., battery operation. Searching for deep-sleep doesn't bring up a lot of hits and the docs say pretty much nothing. Is the framework just not geared towards low power operation and pretty much assumes mains power?
On the ESP32 I would expect a bunch of things to support low power, from different sleep modes (light sleep, deep sleep) to setting appropriate pin modes while sleeping, choosing different clock rates, controlling wifi sleep modes, etc.
Beta Was this translation helpful? Give feedback.
All reactions