cancel
Showing results for 
Search instead for 
Did you mean: 

How to execute code after "wakeup"

BBeck.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Olivier GALLIEN
ST Employee

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

Olivier GALLIEN
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

5 REPLIES 5
Olivier GALLIEN
ST Employee

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

Olivier GALLIEN
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.
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

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

Olivier GALLIEN
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.

Hi @BBeck.1​ ,

For kernel 5.10 content of Documentation/power/interface.rst has been merged in linux/sleep-states.rst at v5.10-stm32mp · STMicroelectronics/linux (github.com)

Olivier

Olivier GALLIEN
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

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