cancel
Showing results for 
Search instead for 
Did you mean: 

Steps to Lowest power

BBeck.1
Associate II

From my understanding of the documentation, my steps to lowest power (VBAT mode) on the STM32MP1-DK2 kit would be:

  1. Connect Battery to VBAT
  2. Set BREN in TF-A
  3. Disable wake sources other than from PMIC and RTC
  4. enter sleep via: "echo mem > /sys/power/state"

Is this correct? Am I missing any steps here?

Thanks,

Ben Beckwith

1 ACCEPTED SOLUTION

Accepted Solutions

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'

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

11 REPLIES 11
PatrickF
ST Employee

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,

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
BBeck.1
Associate II

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

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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
BBeck.1
Associate II

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

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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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'

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thanks!

Just to clarify, which device tree is this (tf-a/uboot/linux)?

Thanks agian.

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