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

PA / LNA S132 clock support

DK version: nRF5_SDK_15.0.0_a53641a

Softdevice version: s132_nrf52_6.0.0_softdevice

I am using a Fanstel BT832X SOC,  which has the SKY66112 PA,  on a custom PCB. The PCB has an external clock source connected.  

I am able to successfully enable the PA when my clock source is set to NRF_CLOCK_LF_SRC_SYNTH and I am able to observe the improved range performance.

BLE connect is successful in this case.

I am trying to do the same using the  NRF_CLOCK_LF_SRC_XTAL  source. The issue I am presently having is when the clock source is set to

NRF_CLOCK_LF_SRC_XTAL and the PA  enable, during a BLE connection there is an immediate disconnect with the reason code

" 0x3e BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED".

Without the PA enabled (using NRF_CLOCK_LF_SRC_XTAL ) BLE connects  without any issues.

I have tried various NRF_CLOCK_LF_ACCURACY_PPM settings but see the same issue using the external clock when PA is enabled. 

I am enabling the PA after softdevice is initialized in all cases and I do get a success returned on sd_ble_opt_set .

How can I resolve this issue that I am having that is specific to using the XTAL and PA/LNA. Any help is appreciated.

Following is my PA enable code for reference (called after soft device, I am getting a success on sd_ble_opt_set ):

#define APP_PA_PIN 17
#define APP_LNA_PIN 19


#define APP_CPS_PIN 6

#define APP_AMP_PPI_CH_ID_SET 0
#define APP_AMP_PPI_CH_ID_CLR 1
#define APP_AMP_GPIOTE_CH_ID 0

void pa_lna_init(uint32_t gpio_pa_pin, uint32_t gpio_lna_pin);

static void pa_lna_setup(void)
{
uint32_t err_code;
ble_opt_t opt;
uint32_t gpiote_ch;
nrf_gpio_cfg_output(APP_CPS_PIN);
nrf_gpio_pin_clear(APP_CPS_PIN); //enable
nrf_gpio_cfg_output(APP_PA_PIN);
nrf_gpio_pin_clear(APP_PA_PIN); //
nrf_gpio_cfg_output(APP_LNA_PIN);
nrf_gpio_pin_clear(APP_LNA_PIN); //





static ble_opt_t pa_lna_opts = {
.common_opt = {
.pa_lna = {

.pa_cfg = {
.enable = 1,
.active_high = 1,
.gpio_pin = APP_PA_PIN
},

.lna_cfg = {
.enable = 1,
.active_high = 1,
.gpio_pin = APP_LNA_PIN
},

.ppi_ch_id_set = APP_AMP_PPI_CH_ID_SET,
.ppi_ch_id_clr = APP_AMP_PPI_CH_ID_CLR,
.gpiote_ch_id = APP_AMP_GPIOTE_CH_ID
}
}
};
  NRF_GPIO->DIRSET |= (1 << APP_PA_PIN) | (1 << APP_LNA_PIN) ;
   err_code = sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &pa_lna_opts);
   //printf("sd_ble_opt_set pa lna%x \r\n",err_code);
   //APP_ERROR_CHECK(err_code);

}

Related