Repository navigation
A LoRa header raises HeaderValid alone - #5
Merged
Merged
Conversation
SyncWordValid is the GFSK modem's interrupt; a LoRa receiver reports its header through HeaderValid. Raising both made every header count as suppressed on a firmware that correctly leaves the FSK bit out of its mask, so MeshCore 1.17, whose receive mask misses nothing on a frame it takes, reported one suppressed event per packet. irq_suppressed is documented as one per event rather than one per masked bit, and the comments on the header timing say how early the old fixed twelve symbols were for the preamble each one names.
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.
Fixes #4.
What this changes
HeaderValidalone.SyncWordValidis the GFSK modem's interrupt (DS_SX1261-2, table 13-29: bit 3, FSK); a LoRa receiver reports the header throughHeaderValid. This model only has a LoRa data path, so there is no FSK case to keep. The carrier-gone clear drops the bit too, since nothing raises it now.vsx_counters.irq_suppressedsays what it counts: one per event, however many of that event's bits were masked.No ABI change.
Effect on the #745 figures
Expected, from the per-frame counts in the new test and not yet rerun end to end: on the three-node link (12 packets), 1.17 (
IrqMask0x0276) should count 0 suppressed rather than 12, and 1.16 (0x0272) 12 (PreambleDetected) rather than 24.Verification
STRICT=1 ./build.sh: 7 test binaries, 0 failures../build.sh sanitize: 7, 0 failures.STRICT=1 ./build.sh shared: builds.clang-format18.1.8--dry-run --Werror include/*.h src/*.h src/*.cpp test/*: clean.test_interrupts.cpp, two frames each: mask0x0276leavesirq_suppressedat 0, mask0x0272counts exactly 2. Both fail againstmain.test_reception.cppnow assertsSyncWordValidis clear whileHeaderValidis set. Fails againstmain.CI
house rulesfails onmainalready:src/VirtualSX1262.his 512 lines, over the 500 limit, since #2. This PR does not touch that file.consumers are up to datefails untilmeshcore-nativemoves its pin.