-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32 Low power consumption with StopWithLowPowerRegulator mode #76
Comments
I don't understand exactly why standby mode is not good for us. |
The system reboots on wakeup. There is no state preserved in SRAM. This is not a "sleep" api. I don't mind if we provide a new "hibernate" API that reboots the system on wakeup. But it can't be called "sleep". And we need an api that just sleeps, as we have many apps that don't justify the complexity of dealing with a reboot. |
Initially, on using Standby mode, we do not see the reboot issue and the power is same during Standby and Stop modes because the Power Interface Clock is not enabled. To access the Power Control register, it is necessary to enable the Power Interface Clock. On enabling the Power Interface Clock, the controller behaves as mentioned in the datasheet. That is during Standby mode, the system reboots on wake-up and we can see the difference in power for Standby mode and Stop modes. |
This issue is addressed by a number of other fixes. It is true that stop mode is better, but the (old) STANDBY API must not actually (ever) enter STANDBY mode, as it will cause apps built with an older version of the Catena-Arduino-Platform to reboot. A new API is introduced by #85, that will really stand by. |
As per STM32l0 datasheet, in Standby mode, the device used to reinitialize during wake up from sleep.
Due to this reason, it is better to configure STM32 sleep in StopWithLowPowerRegulator.
Enable Power interface clock, Low power voltage regulator, and Ultra-Low-power mode under HAL_PWR_EnterSTOPMode in stm32l0xx_hal_pwr.c.
The text was updated successfully, but these errors were encountered: