Skip to main content
BBeck.1
Associate III
January 12, 2022
Solved

Steps to Lowest power

  • January 12, 2022
  • 3 replies
  • 5318 views

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

This topic has been closed for replies.
Best answer by PatrickF

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'

3 replies

PatrickF
ST Employee
January 14, 2022

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 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
BBeck.1
BBeck.1Author
Associate III
January 18, 2022

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

PatrickF
ST Employee
January 18, 2022

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 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
BBeck.1
BBeck.1Author
Associate III
January 25, 2022

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

PatrickF
PatrickFBest answer
ST Employee
January 25, 2022

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 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
PatrickF
ST Employee
February 3, 2022

Hi,

I got confirmation that it is working like I explained. TF-A device tree is enough.

Was double checked on ecosystems v3.0 and v3.1.

On DK1/DK2 board, you could check VDD shutdown on one of the BOOT switches with a voltmeter (GND point available next to it).

0693W00000JOMUMQA5.pngRegards.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent