Closed BarryPSmith closed 4 years ago
I was able to reproduce this, thanks.
You're right, NSS must go low before checking BUSY pin. BUSY should be held high in sleep mode, and since we wait for BUSY to go low at the start of SX126x::SPItranscation()
, it will never leave the waiting loop, hence the timeout.
I'm not entirely sure why is NSS pulled low after checking BUSY pin - I think it might have been an effort to not start any SPI transactions as long as BUSY is high.
Will fix in a second.
Fixed in 3db5134, thanks for reporting!
Describe the bug SX126x modules cannot be woken with the library, instead one must manually wake the unit with a digital write to its select pin.
It looks like in
SX126x::SPItransfer
, moving the linedigitalWrite(_mod->getCs(), LOW);
to run before theWait for BUSY
loop will fix this (first sentence in datasheet section 8.2.2) but I'm not sure if there's a reason it needs to be where it is.To Reproduce
Expected behavior The module can be woken from sleep by asking it to return to standby
Additional info (please complete):