Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Antenna switch never turns ON TX path on some SX1276 boards. #1404

Open
branek opened this issue Jan 12, 2023 · 0 comments
Open

Antenna switch never turns ON TX path on some SX1276 boards. #1404

branek opened this issue Jan 12, 2023 · 0 comments

Comments

@branek
Copy link
Contributor

branek commented Jan 12, 2023

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.

@branek branek changed the title Antenna switch never turn TX path on some SX1276 boards. Antenna switch never turns ON TX path on some SX1276 boards. Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant