contiki-os / contiki

The official git repository for Contiki, the open source OS for the Internet of Things
http://www.contiki-os.org/
Other
3.72k stars 2.58k forks source link

Software-based energy estimation: support deep sleep #1564

Closed atiselsts closed 5 years ago

atiselsts commented 8 years ago

Contiki energy estimation mechanism (energest) currently has support for 10 different enum energest_type values. However, all CPU energy estimation goes under either CPU or LPM. This model is very inadequate for the newer platforms such as JN516x and CC2650 where the platform-specific Contiki code supports both "simple" and "deep" sleep levels, and these levels have vastly different energy consumptions.

The first step would be to introduce something like ENERGEST_TYPE_DEEP_LPM in addition to ENERGEST_TYPE_LPM and extend apps/powertrace output accordingly. However, this still would fail to account all the different possible energy levels of e.g. CC2650 where there are multiple power domains that can be turned on/off separately.

What do you think is the best way to approach this?

simonduq commented 8 years ago

We could maybe consider platform-specific redefinitions of energest_type to support arbitrary number of sleep modes and H/W states? Possibly with a string associated to it for nice powertrace output.