2023-06-01 04:18 AM
Hi All,
I am working with the STM32WL55 MCU in a project-based between Generic Node and MB1389 (Nucleo board). my code is using Lorawan_End_Node.
Everything seems to be working well but the radio part is not transmitting (checking it with AIRSPY an a SDR device). We can see the LoRaWAN messages debug logs and it tries to connect to the network but no radio at all.
Things we have seen:
I did all the steps from this tutorial:
https://www.youtube.com/watch?v=Gjuu4OOPh1w&t=1477s
the hardware design is
https://github.com/Sosteco/generic-node-se/blob/develop/Hardware/sch/sch-stm32wl.pdf
Our design main difference is that we are using 32MHz HSE TCXO with 3.3 VDD, we modified TCXO_CTRL_VOLTAGE from TCXO_CTRL_1_7V to TCXO_CTRL_3_0V in radio_conf.h
I checked the voltages in PB0_VDD_TCXO is 0.756 V (always), it must be arround 3.0 V... and VFBSMPS is 1.945v and it must be maximum 1.62 (datasheet).
Firmware shows as it is transmiting properly (i am only testing Phy layer, not Lorawan):
###### OTAA ######
###### AppKey: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
###### NwkKey: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
###### ABP ######
###### AppSKey: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
###### NwkSKey: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
###### DevEui: 00-00-00-00-00-00-00-00
###### AppEui: 00-00-00-00-00-00-00-00
0s046:TX on freq 868100000 Hz at DR 0
2023/05/29 12:49:15: 4s072:MAC txTimeOut
###### = JOIN FAILED
2023/05/29 12:49:21: 10s073:TX on freq 868500000 Hz at DR 0
2023/05/29 12:49:25: 14s098:MAC txTimeOut
###### = JOIN FAILED
2023/05/29 12:49:31: 20s073:TX on freq 868100000 Hz at DR 0
2023/05/29 12:49:35: 24s098:MAC txTimeOutt
Any help is welcome
Best Regards,
Rodrigo
2023-06-08 10:31 AM - edited 2023-11-20 04:14 AM
@RPaja.1
hello, did you resolve your problem?
I have the same problem with my custom board.
but voltage VDDRF1V55 = 1.5V
all other 3.3V
and I don't receive any interrupt from the SUBGHZ module and doesn't anything transmit
2023-06-09 12:05 AM
Hi @Yevhen ,
Thanks for your response, but i did not resolve my problem. My code is the same and firmware looks like it is working but antenna is not transmiting (checked with Gateway properly working and SRD tool)
2023-06-09 03:32 AM
Does interrupt from subGhz work?
2023-06-09 03:08 PM
@RPaja.1 check the 32 mhz quartz. My was wrong solder, and after fix it - subghz module is working good
2023-06-12 02:20 AM
Thanks @Yevhen , i will check it and let you know. Regards
2023-12-06 08:10 AM
This is one of the first search results for "MAC txTimeout", so I thought I would document my experience and solution.
"MAC txTimeout" is a generic error printed by OnRadioTxTimeout() in Middlewares/Third_Party/LoRaWAN/Mac/LoRaMac.c. It occurs when the SubGHz PHY times out during a transmit. That is, the SubGHz PHY did not notify the application that the transmit was completed (the error does not mean that the transmission failed to be acknowledged by the LoRa gateway). If you're experiencing this error, it's likely that the SubGHz PHY interrupt is not working properly (SUBGHZ->NVIC Settings->Enable interrupt must be ticked; validate that the interrupt is being processed correctly).
In more detail:
The timeout referred to in the error message (4 seconds aka 4000ms, hard coded) is defined in Middlewares/Third_Party/LoRaWAN/Mac/Region/RegionEU868.c (or the relevant file for your configured region). The value is passed to a timer, which fires a timer interrupt when it expires.
657: Radio.SetTxConfig( modem, phyTxPower, 0, bandwidth, phyDr, 1, 8, false, true, 0, 0, false, 4000 );
Increasing this timeout will probably not help, because it's not a timeout on the time to get a response from the LoRa gateway, it's a timeout on the modem hardware completing the packet transmission. 4000ms is plenty for a 24-byte packet at DR_0.
The modem notifies the application that transmission is complete by firing an interrupt. This interrupt is handled by RadioOnDioIrq() in radio.c and control eventually passes to one of the first three callback functions below, all in Middlewares/Third_Party/LoRaWAN/Mac/LoRaMac.c. The two timeout callbacks are triggered by a timer, not from the radio interrupt.
MacCtx.RadioEvents.TxDone = OnRadioTxDone; // triggered by SUBGHZ interrupt
MacCtx.RadioEvents.RxDone = OnRadioRxDone; // triggered by SUBGHZ interrupt
MacCtx.RadioEvents.RxError = OnRadioRxError; // triggered by SUBGHZ interrupt
MacCtx.RadioEvents.TxTimeout = OnRadioTxTimeout; // triggered by Timer interrupt
MacCtx.RadioEvents.RxTimeout = OnRadioRxTimeout; // triggered by Timer interrupt
Radio.Init( &MacCtx.RadioEvents );
OnRadioTxDone is key, because (through an indirect path) it calls ProcessRadioTxDone(). This is the function that puts the modem into receive mode (after a 5s or 6s time interval proscribed by the LoRa protocol) and listens for the Join-Accept packet, or any downlink messages.
So, if the radio interrupt never fires, all that is left is OnRadioTxTimeout, which prints the "MAC txTimeout" error message, and the modem will never be placed into RX mode.
Other potential gotchas
/* Set system maximum tolerated rx error in milliseconds */
LmHandlerSetSystemMaxRxError( 20 );
Alternatively, a more accurate system clock is probably a better idea.
A USB SDR dongle plus software that can display the RF spectrum in a waterfall plot (eg, gqrx) is extremely useful to understand what is going on.
I hope this saves someone a week of debugging!