cancel
Showing results for 
Search instead for 
Did you mean: 

How configure and enable the Low-power timer as wakeup source in Linux?

viniciusfre
Associate II

I would like to set the low-power timer as wake up source to wake up the Linux from sleep mode with some periodic time, let's see every 5 minutes. All I have found is pwm and counter examples here: https://wiki.st.com/stm32mpu/wiki/LPTIM_device_tree_configuration

1 ACCEPTED SOLUTION

Accepted Solutions
Jean-Marc S
ST Employee

Hello

I suppose you need to:

  • 1) Configure the LPTIM using CubeMx (duration of the periodic time,..)
  • 2) Activate the wakeup source for LPTIM

example provided here for UART4:

https://wiki.st.com/stm32mpu/wiki/Power_overview#Example_of_wakeup_source_activation

echo enabled > /sys/devices/platform/soc/40010000.serial/tty/ttySTM0/power/wakeup

echo enabled > /sys/devices/platform/soc/40010000.serial/power/wakeup

(LPTIM @ is 40009000)

     

 make sure the clock for LPTIM are activated during the sleep mode

(only some possible hint, I am not familiar with DT myself, hope it helps)

JM

View solution in original post

1 REPLY 1
Jean-Marc S
ST Employee

Hello

I suppose you need to:

  • 1) Configure the LPTIM using CubeMx (duration of the periodic time,..)
  • 2) Activate the wakeup source for LPTIM

example provided here for UART4:

https://wiki.st.com/stm32mpu/wiki/Power_overview#Example_of_wakeup_source_activation

echo enabled > /sys/devices/platform/soc/40010000.serial/tty/ttySTM0/power/wakeup

echo enabled > /sys/devices/platform/soc/40010000.serial/power/wakeup

(LPTIM @ is 40009000)

     

 make sure the clock for LPTIM are activated during the sleep mode

(only some possible hint, I am not familiar with DT myself, hope it helps)

JM