Skip to content
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

Closed
dhineshkumarmcci opened this issue Apr 8, 2019 · 4 comments
Closed
Assignees

Comments

@dhineshkumarmcci
Copy link
Member

As per STM32l0 datasheet, in Standby mode, the device used to reinitialize during wake up from sleep.

After waking up from Standby mode, program execution restarts in the same way as after a
Reset (boot pins sampling, vector reset is fetched, etc.).

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.

@chwon64
Copy link

chwon64 commented Apr 11, 2019

I don't understand exactly why standby mode is not good for us.
If standby mode saves more power than stop mode, we need to use it.
What did you see exactly and why that's not good for us?

@terrillmoore
Copy link
Member

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.

@dhineshkumarmcci
Copy link
Member Author

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.

terrillmoore added a commit that referenced this issue Apr 14, 2019
…R_CR_ULP"

This reverts commit 9e5d3b7. See
Terry's comments in #76 review for why. It needs reconsideration.
@terrillmoore
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants