2022-01-12 09:06 AM
From my understanding of the documentation, my steps to lowest power (VBAT mode) on the STM32MP1-DK2 kit would be:
Is this correct? Am I missing any steps here?
Thanks,
Ben Beckwith
Solved! Go to Solution.
2022-01-25 01:43 AM
To allow 'shutdown -h 0' to enter in Shutdown instead of Standby, you should change the 'system_off_soc_mode' in Device Tree.
&pwr_regulators{
status = "okay";
secure-status = "okay";
/* USER CODE BEGIN pwr_regulators */
system_suspend_supported_soc_modes = <
STM32_PM_CSLEEP_RUN
STM32_PM_CSTOP_ALLOW_LP_STOP
STM32_PM_CSTOP_ALLOW_STANDBY_DDR_SR
>;
/* system_off_soc_mode = <STM32_PM_CSTOP_ALLOW_STANDBY_DDR_OFF>; */
system_off_soc_mode = <STM32_PM_SHUTDOWN>;
vdd-supply = <&vdd>;
vdd_3v3_usbfs-supply = <&vdd_usb>;
/* USER CODE END pwr_regulators */
};
Regards.
In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'
2022-01-14 12:37 AM
Hi @BBeck.1 ,
to enter VBAT mode, you should issue
shutdown -h 0
wake up is then done using 'WAKE UP" button on STM32MP157x-DK1/DK2 (or RTC wake up if VBAT is present and RTC set up correctly)
As you mention, to retain RETRAM you need to set BREN bit. You need to modify TF-A source code as I think on Starter Package SW, BREN is cleared on entering in low power mode.
Obviously, VBAT is needed if you want to retain RTC, TAMP, BKPSRAM or RETRAM. In shutdown, all STPMIC1 outputs are OFF.
Regards,
2022-01-18 08:10 AM
Patrick,
Thanks for your reply.
I find that if I use the method above, my DK2 is using more power than if I do the "echo mem > /sys/power/state" mechanism. Can you explain why this is? I'd expect the former to be almost zero and the latter to be a greater power consumer than "shutdown."
Thanks,
Ben
2022-01-18 08:47 AM
Hi,
did you talk about VBAT power ?
In shutdown, as there is no VDD, the power of enabled IP (e.g. RETRAM, BKPSRAM, RTC, TAMP) are fed from VBAT.
In Standby, as VDD is still present, there is almost no power from VBAT.
If you talk about general VBUS supply, the DK2 board is not optimized for low power, there is still some component powered (STLINK, etc..).
See https://community.st.com/s/question/0D50X0000BB2xkBSQR/st32mp157cdk2-low-power-operation
https://community.st.com/s/question/0D53W000014WCrASAW/how-to-disable-the-stlink-from-stm32mp157dk1
If you are seeking for power consumption value, please refer to product datasheet (e.g. DS12505 for STM32MP157C or F) as well as AN5284 (note that this AN was using old ecosystem SW, so Linux commands might have evolved, as well as power results which has sometimes been optimized on latest Ecosystem).
Regards.
2022-01-24 07:34 PM
Patrick,
Thanks for your reply. I'm not sure that I'm getting into the vbat mode. I find that if I set an rtc alarm without VBAT powered up the alarm still works (I'd expect it not to, as all rails should be off). The same power usage happens whether or not I have VBAT installed.
Is there some implicit behavior if VBAT isn't present?
Thanks,
Ben
2022-01-25 12:02 AM
Hi,
you are right, the "shutdown -h 0" only enter Standby without DDR (i.e. VDD is still present, so VBAT is not used). Sorry for this wrong information.
I have to check with expert if entering VBAT in SW is possible with delivered starter package. I will let you know.
Meanwhile, you could enter in VBAT by 'brute force' by pressing 'WAKE UP' for more than 10sec. This will STOP PMIC without any SW action (and without stopping processing and Flash accesses, which is not recommended). You have to ensure BREN and RTC related settings are done before.
I think the wakeup using STPMIC1 WAKE_UP pin will work even in that case.
Regards.
2022-01-25 01:43 AM
To allow 'shutdown -h 0' to enter in Shutdown instead of Standby, you should change the 'system_off_soc_mode' in Device Tree.
&pwr_regulators{
status = "okay";
secure-status = "okay";
/* USER CODE BEGIN pwr_regulators */
system_suspend_supported_soc_modes = <
STM32_PM_CSLEEP_RUN
STM32_PM_CSTOP_ALLOW_LP_STOP
STM32_PM_CSTOP_ALLOW_STANDBY_DDR_SR
>;
/* system_off_soc_mode = <STM32_PM_CSTOP_ALLOW_STANDBY_DDR_OFF>; */
system_off_soc_mode = <STM32_PM_SHUTDOWN>;
vdd-supply = <&vdd>;
vdd_3v3_usbfs-supply = <&vdd_usb>;
/* USER CODE END pwr_regulators */
};
Regards.
In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'
2022-01-25 09:32 AM
Thanks!
2022-01-25 01:21 PM
Just to clarify, which device tree is this (tf-a/uboot/linux)?
Thanks agian.
2022-02-01 12:02 PM
Patrick,
Thanks for this. I've implemented the above changes in my tf-a device tree file, and verified that it DOES change behavior, but unfortunately not to my desired state. Instead of going into shutdown, the device maintains approximately the same power as a fully on system. Is there another step that needs to happen?
Thanks,
Ben