ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.67k stars 2.98k forks source link

Add shutdown mode to sleep api #6081

Closed ivanccu closed 5 years ago

ivanccu commented 6 years ago

Description


Enhancement

Reason to enhance or problem with existing solution Currently it is starting to work in the industrial sector with the internet of things. One of the characteristics of IoT is the low consumption. To achieve this low consumption, manufacturers already have microcontrollers such as the STM32L4 capable of entering ultra-low consumption mode (shutdown), sacrificing information not stored in memory. This utility is very useful at the moment but, in spite of the fact that in this case ST has implemented this functionality for its microcontroller, this function does not exist in the mbed library. With the current library (sleep) you can only reach two operating modes (sleep and deepsleep) that have higher consumption than shutdown. Therefore if you need to use the shutdown function in your project you need to go down to the HAL level and try to do it on your own. Possibly resulting errors since going down to the HAL layer implies losing the thread safety

Suggested enhancement Add shutdown mode to de mbed library

Pros -more easy to use for the user -mbed will be more itnerested for the market, specially on Iot devices

Cons -invalid function for some microcontrollers

LMESTM commented 6 years ago

Please consider adding RTC::alarm service together with shutdown [Mirrored to Jira]

adbridge commented 6 years ago

Internal Jira reference: https://jira.arm.com/browse/IOTHAL-83

jeromecoutant commented 5 years ago

Hi Why there is no explanation for issue closing ? Thx

0xc0170 commented 5 years ago

This is being tracked internally via another ticket. Thus this was closed and original kept (it's not on Github as an issue).

@donatieng can correct me.

cmonr commented 5 years ago

Either way, if an issue was closed because it was duplicated, a message indicating what it's a duplicate of should be provided.