fix(radio): consume upstream lora-phy pre-command BUSY check
Pick up the proper fix from our fork at swaits/lora-rs@fix/sx126x-busy-race: move the ready check from *after* to *before* each SPI op per the Semtech manuals (SX1261/2 §8.3.1, LR1121 UM §3 / §3.5, LR1110 DS §1.2.5) and rename InterfaceVariant::wait_on_busy to wait_until_ready. Firmware side is surgical: since the upstream fix keeps the GenericSx126xInterfaceVariant::new signature at 5 args (no DelayNs threading), there is nothing to change in the four nRF / ESP / RP2040 board files beyond a one-line comment rename (wait_on_busy -> wait_until_ready) in the BUSY-pullup comment on the two nRF boards. Wire in the [patch.crates-io] override pointing at ../../lora-rs/lora-phy, bump the dep spec to the pre-release 3.0.2-alpha that matches the fork, and enable the defmt-03 feature that upstream moved behind a gate between 3.0.1 and the fix branch. TODO.md rewritten to track the new approach: PR body template with verbatim citations from all three Semtech chip manuals (SX1261/2, LR1121 UM, LR1110 DS) plus the SX1276 pin table confirming the family has no BUSY line. No change to firmware behavior beyond picking up the upstream fix, which takes first-TX-after-boot success from ~50% to 20/20 on the Seeed Wio Tracker L1 repro board.
This commit is contained in:
3 files changed
+278
-15
No files matched your search
+9
-1
@@ -32,7 +32,7 @@ ucobs = { version = "0.3", features = ["legacy-msrv"] }
|
||||
heapless = "0.9"
|
||||
donglora-protocol = "1"
|
||||
hsmc = { version = "0.2", default-features = false, features = ["embassy"] }
|
||||
lora-phy = "3.0"
|
||||
lora-phy = { version = "3.0.2-alpha", features = ["defmt-03"] } # matches the in-tree [patch.crates-io] override; drop the pre-release selector once upstream releases the fix
|
||||
portable-atomic = { version = "1", optional = true, default-features = false, features = ["critical-section"] }
|
||||
static_cell = "2.1"
|
||||
|
||||
@@ -212,6 +212,14 @@ esp-rtos = { git = "https://github.com/esp-rs/esp-hal.git", branch = "main"
|
||||
esp-backtrace = { git = "https://github.com/esp-rs/esp-hal.git", branch = "main" }
|
||||
esp-println = { git = "https://github.com/esp-rs/esp-hal.git", branch = "main" }
|
||||
|
||||
# Local fix for a BUSY-assertion race: lora-phy currently polls BUSY
|
||||
# *after* each SPI op, but SX1261-2 §8.1.4 specifies a *pre*-command
|
||||
# check (same pattern as RadioLib's SPIwriteStream). This override pulls
|
||||
# in the corrected ordering and renames `wait_on_busy` to
|
||||
# `wait_until_ready`. See TODO.md for the PR body. Remove this line once
|
||||
# the fix is merged upstream + released on crates.io.
|
||||
lora-phy = { path = "../../lora-rs/lora-phy" }
|
||||
|
||||
[lints.clippy]
|
||||
undocumented_unsafe_blocks = "deny"
|
||||
|
||||
|
||||
Reference in new issue
Block a user