This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PA LNA in BLE Softdevice stack switching off during mesh provisioning process.

Hello,

We have the following problem with a custom board based on the nRF52832 and the SKY66112-11 PA LNA, running as a mesh node.

The SDKs used are nrf5_SDK_for_Mesh_v3.1.0_src and nRF5_SDK_15.2.0_9412b96.

The application running on the board is based on the light_switch_server_nrf52832_xxAA_s132_6_1_0 application and we initialize the PA LNA for both stacks (Mesh stack and the normal BLE Softdevice stack) using following parameters:

/* Static global variable for SKY66112 PA/LNA control */

static mesh_pa_lna_gpiote_params_t m_pa_lna_params = {

       .lna_cfg = {

           .enable = 1,

           .active_high = 1,

           .gpio_pin = CRX

       },

       .pa_cfg = {

           .enable = 1,

           .active_high = 1,

           .gpio_pin = CTX

       },

       .ppi_ch_id_set = 0,

       .ppi_ch_id_clr = 1,

       .gpiote_ch_id = 0

};

 

/* Static global variable to enable BLE stack to control the PA/LNA */

static ble_opt_t pa_lna_opts = {

        .common_opt = {

            .pa_lna = {

                            

                .pa_cfg = {

                    .enable = 1,

                    .active_high = 1,

                    .gpio_pin = CTX

                },

 

               .lna_cfg = {

                    .enable = 1,

                    .active_high = 1,

                    .gpio_pin = CRX

                },

                               

                .ppi_ch_id_set = 0,

                .ppi_ch_id_clr = 1,

                .gpiote_ch_id = 0

            }

        }

    };

The PA LNA works fine until we start the provisioning process.  For some reason the PA LNA is switched off in the BLE Softdevice stack during the provisioning (we use the nRF Mesh app for provisioning and configuration).  Only by holding the provisioning device very close to the antenna of the node the provisioning and configuration process can continue.

Once the provisioning and configuration of the node is complete the PA LNA stays off in the BLE Softdevice stack.  Only after a reboot of the node the PA LNA is switched on again in both stacks and then stays on even if we reconnect using the nRF Mesh app and do some reconfiguration.

The PA LNA keeps on running normally in the Mesh stack during all of the above.

Any idea what the issue is and how we can solve this?

Thanks a lot for your support.

Parents Reply Children
  • Yes, I have seen these and taken all the advise into account.  Still I have this issue.

  • Hello Mttrinh,

    We absolutely need to have this solved so we need your help.

    To start with a clean sheet we took a fresh BLE Mesh Light Switch Server Demo and added the PA LNA  init parameters as described earlier.

    Here is how the initialize function looks like:

    static void initialize(void)
    {
        uint32_t err_code;
    
        __LOG_INIT(LOG_SRC_APP | LOG_SRC_ACCESS | LOG_SRC_BEARER, LOG_LEVEL_INFO, LOG_CALLBACK_DEFAULT);
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "----- BLE Mesh Light Switch Server Demo -----\n");
    
        ERROR_CHECK(app_timer_init());
        hal_leds_init();
    
    #if BUTTON_BOARD
        ERROR_CHECK(hal_buttons_init(button_event_handler));
    #endif
    
        ble_stack_init();
    
        err_code = sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &ble_pa_lna_opts);
        APP_ERROR_CHECK(err_code);
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Return from sd_ble_opt_set = 0x%04x\n", err_code);
    
    
    #if MESH_FEATURE_GATT_ENABLED
        gap_params_init();
        conn_params_init();
    #endif
    
        mesh_init();
    
        err_code = mesh_pa_lna_gpiote_enable(&m_pa_lna_params);
        APP_ERROR_CHECK(err_code);
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Return from mesh_pa_lna_gpiote_enable = 0x%04x\n", err_code);
    }

    Please have a look at the following screen captures you will see that everything goes well untill the BLE stack has to kick in.  Apparently the PA LNA isn't driven at all by the BLE stack.

    Here is a screen shot from our sniffer when the proxy takes over:

    And here is what RTT Viewer says:

    Looking forward to your further feedback.

  • It seems like initialize function is correct, have you tried the code on a DK to see if there is anything wrong with your custom board?

  • Hello Mttrinh,

    Thanks for the follow-up.  No I didn't try it on a DK since these don't have a PA LNA on board.

    Since the PA LNA works perfectly well with the Mesh stack on our custom board, I don't see why there should be a difference when the BLE stack takes over.

  • If you leave out Mesh and try PA LNA with BLE stack only, does it work? Do you see the same issue?

Related