Replies: 5 comments 15 replies
-
This is a bit tricky, because pulling the CS pin low on SX126x is required to get it from sleep mode, and it actually has nothing to do with any SPI transactions (on a side note it should probably be released before the SPI transaction call, maybe that is the root cause?). So I think this is not actually a system-level issue, locking from your own HAL is the preferred solution from my point of view. How exactly would this work? We would let user set these lock/unlock callbacks and call them before any IO operation if set? |
Beta Was this translation helpful? Give feedback.
-
I just commented out the mentioned code in
The GPIO is already pulled low in the next call to function |
Beta Was this translation helpful? Give feedback.
-
@GUVWAF added in b2b4c9e and tested on my test setup (while also checking that indeed just removing the NSS pull to wakeup does indeed break everything when BUSY is connected). I also applied this to LR11x0 and SX128x since they both use the same NSS pull wakeup mechanism. |
Beta Was this translation helpful? Give feedback.
-
Very conflicted here - I've a number of contacts where I've pointed them to Meshtastic and now I get an email from one of them asking if this sort of encounter is normal. Is there a Meshtastic fork that comes with less caffeinated devs? Wasted time this morning unravelling a Helium mapper repro that claims TTN support but just nukes the FUP, says it uses LMIC in the docs but actually RadioLib. So not enjoying Open Source today at all. Meh. |
Beta Was this translation helpful? Give feedback.
-
Indeed the commit b2b4c9e seems to have other dependencies, or better blocking other projects. It would be nice to push it a bit. |
Beta Was this translation helpful? Give feedback.
-
In Meshtastic, we’re using a modified HAL for
spiBeginTransaction()
/spiEndTransaction()
to acquire and release a lock to prevent access to the bus when using another peripheral at the same time (e.g. a TFT screen). However, occasionally we still got SPI errors back from the radio, which was caused by pulling the CS pin low instandby()
before the SPI transaction. To solve this, we have to lock around all calls to RadioLib.Would it be an idea to create an SPI lock and unlock callback to
Module
, which can be optionally set, to protect the SPI transactions as well as pulling the CS pin?Beta Was this translation helpful? Give feedback.
All reactions