2022-02-28 12:57 PM
I am configuring the CPU to wake up from UART reception and/or GPIO interrupt:
echo enabled > /sys/devices/platform/soc/4000f000.serial/tty/ttySTM1/power/wakeup
echo enabled /sys/devices/platform/soc/4000f000.serial/power/wakeup
And it goes to sleep with:
echo "mem" > /sys/power/state
After 1 hour in sleep mode, the time is 20 minutes slow. This is not happening in Run mode.
Additional Information:
Solved! Go to Solution.
2022-03-01 08:37 AM
Hello PatrickF,
Thanks for your response. That brought me to the solution. We need to "Set the System Time from the Hardware Clock" after wake up. The drift between system clock and RTC after wake up:
# date
Tue Mar 1 15:39:04 UTC 2022
# hwclock -r (RTC)
2022-03-01 15:49:04.894246+00:00
What it is fixed with: hwclock -s
2022-03-01 01:25 AM
Hi @viniciusfre
Need more details to analyze further.
Which board are you using ?
Are you sure about your 32k crystal ?
Did you keep default RTC LSE settings ?
Did you ensure RTC time is set with system time before going to low power mode ?
Linux timedatectl command could help you to understand.
Regards,
Patrick
2022-03-01 08:37 AM
Hello PatrickF,
Thanks for your response. That brought me to the solution. We need to "Set the System Time from the Hardware Clock" after wake up. The drift between system clock and RTC after wake up:
# date
Tue Mar 1 15:39:04 UTC 2022
# hwclock -r (RTC)
2022-03-01 15:49:04.894246+00:00
What it is fixed with: hwclock -s
2022-03-01 08:52 AM
Nice to see it is ok.
Regards.
In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'