-
Notifications
You must be signed in to change notification settings - Fork 11
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 Sleep/Stop mode power optimization #132
Comments
We have worked on the power consumption during sleep. We tried resetting the GPIO pins before sleep and able to achieve average power consumption of 6 uA for Catena 4801 and 24 uA for Catena 4612. We made further research and see that PB13 is the GPIO pin that reflect in Power consumption. We tried resetting only PB13 and the result is almost similar to above result. I have committed the changes to the branch 'issue132'. I also like to add up that PB13 is configured as SPI2 SCLK in STM32 devices. Instead of resetting in library, this pin can be handled as digital pin in the top level sketch. In this case the average power is similar to the above result. But the maximum power is upto 36 uA, whereas in other cases it is less than 30 uA. I have tried out the following test cases:
The average power consumption of Catena 4612 for the case 2, 3, 4 and 5 is 24.4 uA, 24.1 uA, 25 uA and 25.4 uA respectively. I see a better result with case 3 in all the sleep cycles. |
If, We use Standby as sleep mode.
So, Every-time exiting from Standby mode cause reinitialize the program. Looks, We might need to use StopWithLowPowerRegulator as sleep mode. Please share your thoughts. |
It really depends on how much work you want to do in the application. If you can save state in FRAM, you can power down completely, and just restore state. However, we don't support this yet with the LMIC. My recommendation is that you use STOP mode for sleeping for now (and set the PWR_CR.ULP and PWR_CR.LPSDSR bits -- bits 9 and bit 0). If that's what you mean by StopWithLowPowerRegulator, then that's correct. That's not an STM32L0 datasheet term, so I'm referring directly to the terms used in section 6.3.9. It apppears to me that we need to set bits 9 and 0 in PWR_CR before sleeping. |
It looks we need to revert changes in HAL_PWR_EnterSTANDBYMode() because changes are not working. |
According to datasheet, it is said that the behavior of Standby mode is to reinitialize the program. Due to this reason, we configured the sleep mode to StopWithLowPowerRegulator. Also added the required changes in Arduino_Core_STM32 stm32l0xx_hal_pwr.c and created a issue #76 in Arduino_Core_STM32. |
Sleep power consumption of Catena 4801 is 54 uA and for Catena 4612 is 34 uA with the latest version of BSP and library. The power consumption has to be reduced further.
The text was updated successfully, but these errors were encountered: