I want to know the meaning of gpiote_ch_id of the struct ble_common_opt_pa_lna_t

I have tried to used the function below.but it will make my key interrupt disable when i set gpiote_ch_id to 0.My key is in PIN 0.11.

So I want to know the meaning of gpiote_ch_id of the struct ble_common_opt_pa_lna_t,and how to set it.Thanks!

#define PA_PIN     NRF_GPIO_PIN_MAP(1, 2)

#define LNA_PIN  NRF_GPIO_PIN_MAP(1, 3)

void ble_pa_assist(void)
{
ret_code_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 assist
ble_opt_t opt;
memset(&opt, 0, sizeof(ble_opt_t));
// Common PA config
opt.common_opt.pa_lna.gpiote_ch_id = gpio_toggle_ch; // GPIOTE channel
opt.common_opt.pa_lna.ppi_ch_id_clr = ppi_set_ch; // PPI channel for pin clearing
opt.common_opt.pa_lna.ppi_ch_id_set = ppi_clr_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 = PA_PIN; // The GPIO pin to toggle
opt.common_opt.pa_lna.lna_cfg.active_high = 1;
opt.common_opt.pa_lna.lna_cfg.enable = 1;
opt.common_opt.pa_lna.lna_cfg.gpio_pin = LNA_PIN;

err_code = sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &opt);
return err_code;
}

Related