LoRaMac-node
LoRaMac-node copied to clipboard
Antenna switch never turns ON TX path on some SX1276 boards.
During CE certification we are able to observe what we believe is the bug with antenna switch handling for some SX1276-boards.c implementations.
Our device uses B-L072Z-LRWAN1 as the reference.
In the function: void SX1276SetAntSw( uint8_t opMode )
there is no switching to TX path:
void SX1276SetAntSw( uint8_t opMode )
{
uint8_t paConfig = SX1276Read( REG_PACONFIG );
switch( opMode )
{
case RFLR_OPMODE_TRANSMITTER:
if( ( paConfig & RF_PACONFIG_PASELECT_PABOOST ) == RF_PACONFIG_PASELECT_PABOOST )
{
GpioWrite( &AntSwitchTxBoost, 1 );
}
else
{
GpioWrite( &AntSwitchTxRfo, 1 );
}
break;
case RFLR_OPMODE_RECEIVER:
case RFLR_OPMODE_RECEIVER_SINGLE:
case RFLR_OPMODE_CAD:
default:
GpioWrite( &AntSwitchRx, 1 );
break;
}
}
There has to be call to GpioWrite( &AntSwitchRx, 0 );
function in case RFLR_OPMODE_TRANSMITTER:
handling, before break
statement for that case.
After we implemented the fix, we are able to see close to 19+ dBm CW power during conductive debug directly on antenna output (some losses because of measurement setup). Without the fix, power for 20 dBm CW setting is somewhere around ~16 dBm.