Knowledge Base
HOME » KNOWLEDGE BASE » FORUM

Command timeout?

According to the SX1261/2 data sheet (Rev 1.1) and "Table 13-77: Status Bytes Definition"
cmd status = 0x3: "Command timeout" is described as "A transaction from host took too long to complete and triggered an internal watchdog. The watchdog mechanism can be disabled by host; it is meant to ensure all outcomes are flagged to the host MCU."

I get this Command timeout after a second attempt to send "SetDioIrqParams()" which seems odd to me. Also, if i set tx timeout to 0 (i.e. disabled) this do not occur.

Is it perhaps TXRX_TIMEOUT and not a failed command as the documentation implies?
Avatar
Hello,

Can you please share the sequence you performed to "get this Command timeout after a second attempt to send "SetDioIrqParams()"?

When you write "Also, if i set tx timeout to 0 (i.e. disabled) this do not occur.", what did not occur? The command timeout after "SetDioIrqParams()"?

If you set timeout = 0 in SetTx command, it means that "the device will stay in TX Mode until the packet is transmitted and returns in STBY_RC mode upon completion." (Table 13-7: SetTx Timeout Duration). Then, the command timeout status will not occur here.

Thanks.
_Matthieu
Yes, if SetTx timeout=0, the command timeout do _never_ occur. Not after SetDioIrqParams or any other command. I suspect it is just a coincident that the command timeout appears where i did. Seems

After each command I read status with GetStatus and check command timeout.
The command sequence is:

SetDioIrqParams
GetStatus = OK
SetPacketParams
GetStatus = OK
WriteBuffer
GetStatus = OK
SetTx (timeout != 0)
GetStatus = OK
(wait until status is tx_done by checking GetStatus periodically)
SetDioIrqParams
GetStatus = FAIL. command timeout

To clarify my question: Exactly what do "command timeout" mean? Is the same as TXRX_TIMEOUT bit in the irq_reg? or does it mean that the previous command failed, for example due to a slow SPI bus?
It also unclear how to disable this command timeout?
Avatar
As you mentioned, the "command timeout" command status (0x03) is directly linked to the bit "Timeout" in the IRQ status register (for both Rx and Tx operations). There is no other way to "disable" it than setting timeout to 0 in SetTx.

Also, I am not able to reproduce the issue on my setup. Can you please share the following data:
- timeout value in SetTx
- Packet and modulation parameters
- Payload length

Thanks.
Ok thanks!
If "command timeout" is the same as "tx rx timeout", perhaps you should add this to next data-sheet revision. it is not very clear on this and I was just guessing 😊

To reproduce the "problem" (that I no longer see as issue as my guess was correct) just provoke a TX timeout. i.e. large payload and low timeout.