Skip to main content
fpoussin
Associate III
October 19, 2021
Solved

Exit from standby

  • October 19, 2021
  • 3 replies
  • 1658 views

EDIT: Found the solution, read for implementation

I'm trying to get the MPU to exit from standby.

 

PWR_ON goes to 0 as expected on shutdown, so far so good.

I'm using PA2 (WKUP2) but it's not working at all...

Is there anything special to setup in the device tree?

I am using discrete power supplies as instructed in the app notes. (PWR_ON to enable pins)

Here's my dts config for TF-A

&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>;
	/* USER CODE END pwr_regulators */
};

Linux config part

wkup {
 compatible = "gpio-keys";
 #address-cells = <1>;
 #size-cells = <0>;
 autorepeat;
 status = "okay";
 
 button@2 {
 label = "WakeUp2";
 linux,code = <BTN_1>;
 interrupts-extended = <&exti_pwr 56 IRQ_TYPE_EDGE_RISING>; // PA2
 status = "okay";
 wakeup-source;
 };
	};

Thank you

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

The issue was the missing gpio-key (it's not documented...)

I've added it in the original post.

3 replies

fpoussin
fpoussinAuthor
Associate III
October 25, 2021

Any ideas?

fpoussin
fpoussinAuthorBest answer
Associate III
October 26, 2021

The issue was the missing gpio-key (it's not documented...)

I've added it in the original post.

Olivier GALLIEN
ST Technical Moderator
October 27, 2021

Hi @fpoussin​ ,

Well catch ! We will work to enhance documentation related to Wake Up.

For next time, please avoid using edit of original post and provide solution in comment.

Thx

Olivier

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.