-
Notifications
You must be signed in to change notification settings - Fork 90
Description
Hello,
I am working on a port of this code for the STM32WL in a RAK3172. I have noticed that the following Tx and Rx functions in the new relay code do not explicitly set the antenna direction with the smtc_modem_hal_set_ant_switch() call.
SMTC_MODEM_HAL_PANIC_ON_FAILURE( ral_set_tx( &( rp->radio->ral ) ) == RAL_STATUS_OK ); |
wor_ral_callback_start_tx
wor_ral_callback_start_rx
In general the lr1_stack_mac_layer handles the Tx cases as follows:
smtc_modem_hal_start_radio_tcxo( ); smtc_modem_hal_set_ant_switch( true ); SMTC_MODEM_HAL_PANIC_ON_FAILURE( ral_set_tx( &( rp->radio->ral ) ) == RAL_STATUS_OK );
In my testing if you break point at the ral_set_tx instances and inside the smtc_modem_hal_set_ant_switch you'll see that at least the very first Tx up during the join process will have the antenna in receive mode. Perhaps this is also the case in later transmits as well if there is a race condition between when the tx task is scheduled and when the antenna direction get set elsewhere.