From 4d723a85ce4a28b9142ad282c9920f7e0a827be3 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Fri, 24 Apr 2026 01:07:02 -0600 Subject: [PATCH] =?UTF-8?q?fix(boards):=20BUSY=20pin=20pull-down=20?= =?UTF-8?q?=E2=86=92=20none=20on=20nRF=20SX1262=20boards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SX1262's BUSY pin has an internal 20 kΩ pull-up (datasheet page 53). Our Input::new(..., Pull::Down) on BUSY creates contention with that internal pull-up, leaving BUSY at an indeterminate voltage. This can cause wait_on_busy to mis-read the chip's ready state — sometimes commands land while the chip is still busy (ignored or corrupted), which manifests as TX_DONE never firing on DIO1 because the SX1262 never actually completed the SetTx it received during BUSY=high. Fix per lora-rs/lora-rs#260: Pull::Down → Pull::None on BUSY. Matches the official lora-rs nRF52840 examples. Applied to both Wio Tracker L1 (reported broken by @swaits today) and RAK4631 (currently works for us, but was affected by the same class of bug per the upstream issue — this makes it deterministically correct rather than 'happens to work'). --- src/board/rak_wisblock_4631.rs | 6 +++++- src/board/wio_tracker_l1.rs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/board/rak_wisblock_4631.rs b/src/board/rak_wisblock_4631.rs index ca5fbe0..3db461b 100644 --- a/src/board/rak_wisblock_4631.rs +++ b/src/board/rak_wisblock_4631.rs @@ -113,7 +113,11 @@ impl LoRaBoard for Board { let reset = Output::new(p.P1_06, Level::High, OutputDrive::Standard); let dio1 = Input::new(p.P1_15, Pull::Down); - let busy = Input::new(p.P1_14, Pull::Down); + // BUSY has an internal 20 kΩ pull-up on the SX1262 die (datasheet + // p. 53); an MCU-side Pull::Down fights it and leaves the line at + // an indeterminate voltage, making wait_on_busy unreliable. See + // lora-rs/lora-rs#260. + let busy = Input::new(p.P1_14, Pull::None); let iv = GenericSx126xInterfaceVariant::new(reset, dio1, busy, None, None) .expect("SX1262 interface init"); diff --git a/src/board/wio_tracker_l1.rs b/src/board/wio_tracker_l1.rs index 94300b8..e7e3b27 100644 --- a/src/board/wio_tracker_l1.rs +++ b/src/board/wio_tracker_l1.rs @@ -96,7 +96,11 @@ impl LoRaBoard for Board { let reset = Output::new(p.P1_07, Level::High, OutputDrive::Standard); let dio1 = Input::new(p.P0_07, Pull::Down); - let busy = Input::new(p.P1_10, Pull::Down); + // BUSY has an internal 20 kΩ pull-up on the SX1262 die (datasheet + // p. 53); an MCU-side Pull::Down fights it and leaves the line at + // an indeterminate voltage, making wait_on_busy unreliable. See + // lora-rs/lora-rs#260. + let busy = Input::new(p.P1_10, Pull::None); // RF switch: RXEN on P1.08 (GPIO, toggled by lora_phy), TX via DIO2 (SX1262 internal). let rx_enable = Output::new(p.P1_08, Level::Low, OutputDrive::Standard);