Fix: Luckfox Pico Pi SX1262 Timing Issue#61
Conversation
Update: Narrowed Luckfox Pico Pi SX1262 Timing FixThis has been refined based on live testing on Pico Pi hardware. The previous timing workaround was broader than necessary. What ChangedThe fix is now limited to the two transitions that actually matter:
What Was RemovedAll previously added broad timing delays have been removed, including:
Timing ValidationTested directly on Pico Pi hardware:
Current Behavior
|
|
This is a great direction and the hardware validation is appreciated. For maintainability and minimal risk, I’d suggest one small scope change: Handle platform detection upstream (in config/runtime wiring), and keep this wrapper platform-agnostic by only exposing a configurable timing value with the existing default preserved. I feel keeping this PR focused on radio timing only default timing unchanged (current value) sorry of the back and forth on this one. |
Refactor: Make SX1262 Wrapper Platform-AgnosticThis change removes board-specific logic from the SX1262 wrapper and keeps the driver fully platform-agnostic. What Changed
Behavior
UsageTo apply the Pico Pi timing fix: radio = SX1262Wrapper(..., radio_timing_delay=0.012) |
This PR fixes a Luckfox Pico Pi–specific SX1262 bring-up timing issue that caused the radio to appear non-functional at normal
INFOlogging levels, while working atDEBUG.On affected Pico Pi boards, the SX1262 initialization path is timing-sensitive. The additional latency introduced by debug logging unintentionally allowed RX/TX to work. At
INFO, that incidental delay disappears, causing the radio to initialize in a bad state:What Changed
Added a Luckfox Pico Pi–specific extended timing path in
sx1262_wrapper.pyIntroduced explicit settle delays between critical SX1262 bring-up steps, including:
RX_CONTINUOUSApplied the same timing constant to key transitions already using generic timing delays:
Scope Control
This ensures no impact to:
Why This Approach
Validation
logging.level: INFOBefore:
DEBUGAfter:
RX restored at
INFOTX restored at
INFOFinal tested file was deployed to the live board and verified via
sha256User-Facing Outcome
DEBUGlogging for RF functionalityINFOlogging levels