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

Review PA LNA

Hello,

Please check my schematics with PA / LNA.

I have problems activating PA / LNA, the connection is very difficult when using the battery, I am forced to use external power.

Moreover, when reviewing RSSI it is not stable when placed near samsung note 8.
PA / LNA code:

void pa_lna_assist(uint32_t gpio_pa_pin, uint32_t gpio_lna_pin)
{
#if BLE_PA_LNA_ENABLE
    uint32_t err_code;

    static const uint32_t gpio_toggle_ch = 0;
    static const uint32_t ppi_set_ch = 0;
    static const uint32_t ppi_clr_ch = 1;
    // Configure SoftDevice PA/LNA assist
    ble_opt_t opt;
    memset(&opt, 0, sizeof(ble_opt_t));
    // Common PA/LNA config
    opt.common_opt.pa_lna.gpiote_ch_id = gpio_toggle_ch; // GPIOTE channel
    opt.common_opt.pa_lna.ppi_ch_id_clr = ppi_clr_ch;    // PPI channel for pin clearing
    opt.common_opt.pa_lna.ppi_ch_id_set = ppi_set_ch;    // PPI channel for pin setting
    // PA config
    opt.common_opt.pa_lna.pa_cfg.active_high = 1;        // Set the pin to be active high
    opt.common_opt.pa_lna.pa_cfg.enable = 1;             // Enable toggling
    opt.common_opt.pa_lna.pa_cfg.gpio_pin = gpio_pa_pin; // The GPIO pin to toggle
    // LNA config
    opt.common_opt.pa_lna.lna_cfg.active_high = 1;         // Set the pin to be active high
    opt.common_opt.pa_lna.lna_cfg.enable = 1;              // Enable toggling
    opt.common_opt.pa_lna.lna_cfg.gpio_pin = gpio_lna_pin; // The GPIO pin to toggle
    err_code = sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &opt);
    APP_ERROR_CHECK(err_code);
#endif
}

int main(void)
{
    log_init();
    timers_init();
    power_management_init();
    ble_stack_init();
    sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
    pa_lna_assist(24, 23);
    gap_params_init();
    gatt_init();
    services_init();
    advertising_init();
    conn_params_init();
    application_timers_start();
    advertising_start();
    for (;;)
    {
        idle_state_handle();
    }
}

Thanks

Related