cpu/sam0_common/periph: fix rtt reset after hibernation#20842
Merged
dylad merged 1 commit intoRIOT-OS:masterfrom Aug 29, 2024
Merged
cpu/sam0_common/periph: fix rtt reset after hibernation#20842dylad merged 1 commit intoRIOT-OS:masterfrom
dylad merged 1 commit intoRIOT-OS:masterfrom
Conversation
benpicco
reviewed
Aug 28, 2024
Member
|
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
Contributor
Author
The issue is on rtt, so in order to see it you need to include the module |
Member
|
I think this PR needs a rebase so static-test will be happy. |
6cc37b7 to
7df7886
Compare
Member
|
Here we go ! |
Member
|
Thanks for the fix ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: