-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpu/sam0_common/periph: fix rtt reset after hibernation #20842
Conversation
I'm a bit confuse here. I understand the issue and what the fix is trying to do but you're fixing the RTT part of the driver while you use the RTC part. So far I was not able to reproduce the issue on SAME54 with |
d8037a6
to
6cc37b7
Compare
The issue is on rtt, so in order to see it you need to include the module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with the right module :)
I think this PR needs a rebase so static-test will be happy. |
6cc37b7
to
7df7886
Compare
Here we go ! |
Thanks for the fix ! |
Contribution description
This PR fixes the issue with rtt reset after a node hibernation
You may notice an issue when using the rtt_rtc module in any RIOT OS example. Specifically, if you use the rtc_gettime() function to get the current time, then set an alarm, put the node into hibernation, and finally retrieve the time again after the node wakes up, you will find that the time is incorrect after hibernation.
I encountered this issue while working with the gcoap example on the same54-xpro board. After adding the rtt_rtc module, I followed the steps mentioned above and observed that the time returned by rtc_gettime() after waking up from hibernation did not match the expected value.
Testing procedure
The output before the fix, you can notice the time after hibernation is wrong
This is the output after the fix: