cancel
Showing results for 
Search instead for 
Did you mean: 

LoRa RX timeout triggers immediately in non-continuous receive mode

Erlkoenig
Associate III

On the STM32WL55, when using LoRa and non-continuous receive mode, the RX timeout triggers immediately, i.e. the value passed to Radio.Rx is ignored. This can be demonstrated using the SubGHz_Phy example on the NUCLEO-WL55JC and setting

#define USE_MODEM_LORA  1
#define USE_MODEM_FSK   0

and also

#define TEST_MODE                     RADIO_RX

 and modifying the call to Radio.SetRxConfig:

  Radio.SetRxConfig(MODEM_LORA, LORA_BANDWIDTH, LORA_SPREADING_FACTOR,
                    LORA_CODINGRATE, 0, LORA_PREAMBLE_LENGTH,
                    LORA_SYMBOL_TIMEOUT, LORA_FIX_LENGTH_PAYLOAD_ON,
                    0, true, 0, 0, LORA_IQ_INVERSION_ON, false);

i.e. setting the last parameter to false such that continuous mode is disabled. The OnRxTimeout function will be called very quickly, even though the timeout is set to 2s. The red LED will flash very quickly. (No transmitter is present, just listening to "silence").

Timeouts work fine on FSK RX in non-continuous mode (red LED flashes slowly).

Strangely, when first setting the modem to LoRa TX and transmitting >= 1 packets and then immediately re-configuring for LoRa RX, the timeout works fine! This does however not work when transmitting an FSK packet before. Going to standby inbetween transmitting a packet and configuring for RX also does not make it work.

Is this a hardware bug?

3 REPLIES 3

>>Is this a hardware bug?

More probably software, I had to fix several issues in continuous mode on earlier versions.

All the source is provided, track/trace why

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

But I'm using non-continuous mode, not continuous.

Tracing the framework source shows me that the RX timeout interrupt was indeed triggered by the SubGHz hardware, and also that the timeout is configured correctly.

Erlkoenig
Associate III

When setting symbTimeout=0, it works. In continuous mode, the middleware does this automatically:

static int32_t RadioSetRxGenericConfig( GenericModems_t modem, RxConfigGeneric_t *config, uint32_t rxContinuous,
                                        uint32_t symbTimeout )
{
...
    if( rxContinuous != 0 )
    {
        symbTimeout = 0;
    }

What is the exact purpose of disabling the symbTimeout only in continuous mode?