-
Notifications
You must be signed in to change notification settings - Fork 3k
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
LoRaWAN: Mitigating reception issues at lower data rates & FCnt increment after retry exhaustion #8822
Merged
Merged
LoRaWAN: Mitigating reception issues at lower data rates & FCnt increment after retry exhaustion #8822
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f4077af
UL FCnt increment in case of retry exhaustion
88490fb
Mitigating reception problems with lower data rates
3ec643f
Style alignment
ca08367
Updating get_rx_window_params() API in stubs
5170daa
RX window calculation algorithm version 2
e1e48b4
Final cleanup and ASCII art for algorithm v2
138fd74
Unit test fix
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
Question for @c1728p9 - does/will the sleep code compensate for the 10ms or whatever deep sleep latency, if a long sleep is requested?
Eg if
wait(1000)
orcall_in(1000)
, do we get a wake from deep sleep at 990 then wake from shallow at 1000, so we hit 1000 precisely, or do we just schedule an interrupt at 1000 so we potentially wake at 1010?This code in particular is trying to hit a 1 second delay for a receive window after a transmit with millisecond precision. Can that be achieved without holding a deep sleep lock?
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.
As long as the RTX knows the wakeup time in advance (via some OS delay/wait call) then it should wakeup correctly with millisecond precision. If you are waking up using the low power ticker or a GPIO pin directly then deep sleep latency compensation won't help, as the OS doesn't know you are wanting to wake up in advance, and you'll need to hold the lock manually.
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.
Great, that's what I hoped. I knew you'd been looking at the compensation, but couldn't recall if it was just covering "teeny" sleeps or reached out for long targets.
In this case, it's via an
EventQueue::call_in
, so that's a timed semaphore wake, so we're good.This "sleep latency compensation only via the OS" thing feels like it should be documented somewhere, but not sure where to encourage people to use OS mechanisms rather than
LowPowerTimer
s. Some sort of knowledge base article about deep sleep/tickless or something. Or maybe even a note onLowPowerTimer
, which is what people might be thinking of using with deep sleep active.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.
@kjbracey-arm can you create a tracking issue for this one?