FORUM

[SX1280] Failure to execute command forever (LoRa)

Hi All,

I have a weird problem with SX1280 using it as a LoRa field gateway. It receives packets from tags and sends synchronization packets well at low traffic. Seems to be o.k. with higher Rx rate (50 packets per second) and low Tx rate. But if the Tx rate is increased to 10 packets per second, it fails typically within minutes.

The driver works as the following: Rx is started by default. On Rx success the packet is extracted (Rx header error is also handled, according to SX1280’s errata sheet), and Rx restarted (if not in continuous Rx mode). On a Tx request SetStandby(XOSC) is invoked asynchronously, status checked and Tx started. After Tx we restart Rx immediately.

The problem:
The sx1280_tx() and sx1280_rx() functions begin with SetStandby(XOSC) and status check. After a while the device randomly starts to produce this status: StandBy RC & Failure to execute command. From this point the device does not receive and does not send anything, in spite of the fact that it is not BUSY (this is checked before every single command). Every Tx will be timed out (not by SX1280, by the driver’s fail safe feature), and before every rx_start and tx_start command it gives StandBy RC & Failure to execute command status.
I don’t want to insert a status check after every single command, but I think that in this weird state the SX1280 cannot execute commands at all (stuck in “Failure to execute command” state).

Any ideas?

I suppose that the problem is around the asynchronous switch to Tx mode. What happens if an Rx is in progress and I call SetStandby?

Thank you in advance.

Gabor