Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 7 months ago.
How to STANDBY mode
Hello.
How to set NUCLEO with ST32F411RE to standby mode with (Standby: 2.4 μA)μA power consumption?
Thanks.
http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00115249.pdf
Question relating to:
1 Answer
9 years, 7 months ago.
Hello,
the mbed API provides two functions - sleep() and deepsleep(). The example uses sleep().
The implementation for 401RE as an example:
void sleep(void) { TimMasterHandle.Instance = TIM5; // Disable HAL tick interrupt __HAL_TIM_DISABLE_IT(&TimMasterHandle, TIM_IT_CC2); // Request to enter SLEEP mode HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI); // Enable HAL tick interrupt __HAL_TIM_ENABLE_IT(&TimMasterHandle, TIM_IT_CC2); } void deepsleep(void) { // Request to enter STOP mode with regulator in low power mode HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI); // After wake-up from STOP reconfigure the PLL SetSysClock(); }
PWR_EnterSTANDBYMode(); Seems to be working for me. Need to use the RTC to wake up. http://mbed.org/users/Sissors/code/WakeUp/ makes setting alarms easier.
posted by Darius Wilkinson 24 Sep 2014