Skip to main content
BBeck.1
Associate III
December 23, 2021
Solved

How to execute code after "wakeup"

  • December 23, 2021
  • 5 replies
  • 2144 views

If I put the system to sleep via the "echo mem > /sys/power/state" mechanism, how can I execute code/script on wakeup event?

Thanks,

Ben

This topic has been closed for replies.
Best answer by Olivier GALLIEN

Hi @BBeck.1​ ,

I recommend you to read our documentation related to low power management starting from here :

How to define your low-power strategy - stm32mpu

Hope it help

Olivier

5 replies

Olivier GALLIEN
Olivier GALLIENBest answer
ST Technical Moderator
January 3, 2022

Hi @BBeck.1​ ,

I recommend you to read our documentation related to low power management starting from here :

How to define your low-power strategy - stm32mpu

Hope it help

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.
BBeck.1
BBeck.1Author
Associate III
January 3, 2022
Oliver,
Thanks (again)! This is helpful information. BTW, in a document (
https://wiki.st.com/stm32mpu/wiki/Power_overview) referred to by the LP
strategy document, there is a reference to another document on the ST
github (
https://github.com/STMicroelectronics/linux/blob/v5.10-stm32mp/Documentation/power/interface.rst)
which is a dead link, and seems to have critical info on wakeup sources.
Is there another source for this info?
Thanks,
Ben Beckwith
Olivier GALLIEN
ST Technical Moderator
January 3, 2022

I confirm the dead link. Thanks for pointing it !

Seems this was ok with previous version kernel 5.4 :

linux/interface.rst at v5.4-stm32mp · STMicroelectronics/linux (github.com)

I come back to you asap with further explanation.

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.
BBeck.1
BBeck.1Author
Associate III
January 7, 2022

Thanks so much for you follow up! I'm on my way to super low power! Thanks to those docs you provided, I've been able to get my system to "hibernate".

Cheers!

Ben