I am trying to use the lp1 mode on the Apalis TK1. To enter in the lp1 mode I use this command:
echo mem > /sys/power/state
According to this tutorial I need to set up a wakealarm in order to wake up after some time. The first problem I have is that my rtc1 does not have a wakealarm function. So I have tried with rtc0 and rtc2 with baffling results.
echo +20 > /sys/class/rtc/rtc0/wakealarm
This command wakes up the TK1, but if I set more time (60s for example) to the wakeup it sleeps forever. The same happens if I use the rtc2.
The rtc time is keept with a coin cell. If I set the time using hwclock commnad I noticed that rtc0 and rtc2 lose the time every shutdown. On the other hand rtc1 keeps the time perfectly. The firts boot I set the time using this command:
timedatectl set-time "2019-09-21 12:21:12" hwclock --rtc=/dev/rtc1 -w
However I can not keep rtc0 and rtc2 using that commands.
To sum up, I managed to set and keep rtc1 time succesfully, but not rtc0 and rtc2, and I can not wake up the TK1 if the sleep time is longer that 20-30s.
I don’t care about rtc0 and rtc2 time losing, rtc1 is enough, but I need to wake up the TK1 after long time periods (7200s).
If useful this is my
dmesg | grep -i rtc output:
dmesg | grep -i rtc [ 0.530089] +V1.05_RTC: 1000 mV at 150 mA [ 5.180799] as3722-rtc as3722-rtc.1: rtc core: registered as3722 as rtc0 [ 5.189387] as3722-rtc as3722-rtc.1: RTC interrupt 449 [ 5.199361] rtc-ds1307 0-0068: rtc core: registered m41t0 as rtc1 [ 5.207802] tegra_rtc tegra_rtc: rtc core: registered tegra_rtc as rtc2 [ 5.221345] tegra_rtc tegra_rtc: Tegra internal Real Time Clock [ 6.663221] as3722-rtc as3722-rtc.1: setting system clock to 2000-01-01 00:00:24 UTC (946684824)
Thanks in advance.