Detection sensor sleep & interrupt - #8766
Closed
Columbo818 wants to merge 15 commits into
Closed
Conversation
Relocates the conditional setting of nRFSenseSleep for NRF52 architecture from runOnce() to the header section, ensuring it is set earlier in the module lifecycle. This change means that the sleep lib is only imported on supported platforms, reducing binary size on other platforms
Eliminated the explicit setting of BACKGROUND priority for non-sensor devices in sendCurrentStateMessage. This would otherwise affect all nodes using the DetectionSensor module in roles other than Sensor.
Minor tweaks to make the code play nice on other platforms
…ity assignment for non-sensor devices
…uration configurable by setting "super duper sleep duration", but not less than 1h
…working with the current sleep.c
Author
|
Some additional testing has revealed an issue where the nRF52 does not wake up. My feeling is to close the PR as sleeping forever ignores the SDS_Secs and will confuse inexperienced users, making them think their nodes are dead. |
Contributor
|
Yeah, trash the pull request, Colombo. I am about to finish what works in both cases.
|
Contributor
|
replaced by #8778, please drop PR. |
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.
Presented by @rbomze and myself, this PR updates the DetectionSensor module to use an interrupt-driven approach when the following conditions are met:
• The device is nRF52840-based
• The node role is Sensor
• Power saving mode is enabled
When these criteria are satisfied, the module uses GPIO interrupts instead of polling, allowing the device to reliably enter deep sleep for ultra-low power operation.
These changes are contained within an
#ifdef ARCH_NRF52to prevent build failures on other platforms, ensuring that they only affect nRF52 devices. Devices that do not meet all of the above conditions, including nRF52-based devices, continue using the existing polling behaviour to maintain compatibility.All existing configuration values (
sds_secsandmin_wake_secs) continue to be respected, preserving expected module behaviour.🤝 Attestations