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

Poor alignment of pa lna signal with RF burst

We are developing a beacon device with 10dBm power amplifier. During software development we noticed the control signals provided by ble_common_opt_pa_lna_t align poorly with the actual RF burst of the advertising beacon. We used a PCA10040 and measured RF output directly from the nRF52832. The amplifier control signal was routed out P0.23. In the bmp files below from the scope the measured RF power (shown in green) starts nearly 10usec ahead of the pa control signal from PPI. During testing with an actual external amplifier this results in significant loss of the advertising signal. The code (shown below) was a direct copy from your example in the blogs.

In general a power amplifier should have at least 1usec of turn on time ahead of the RF burst. Given the jitter and latency associated with your implementation on the PPI bus, 5 usec of advance notice would be useful. We are using S132 2.0.0-8 on nRF52832-QFAA-BA. Please advise how this can be resolved.

static void pa_lna_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/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_set = ppi_set_ch;            // PPI channel for pin clearing
opt.common_opt.pa_lna.ppi_ch_id_clr = 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    = 23;      // 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     = 22;   // The GPIO pin to toggle

NRF_GPIO->DIRSET = PA_MASK;
err_code = sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &opt);
APP_ERROR_CHECK(err_code);
	

} Leading edge of channel 1 burst

All three advertising bursts and RF in green Test Setup

Parents Reply Children
  • I will have to source some production nRF52832's first. All I have is engineering B versions since they were bought about 2 months ago. Engineering B is not compatible with production S132. I will buy some production chips and report back.

  • The test was repeated with an nRF52832QFAA-B0 on a PCA10040 dev board using version 2.0.0 of the S132 softdevice. The application was the unmodified ble_app_beacon from version 11.0.0 of the SDK. The only thing added to the code was the snippet for turning on PA_LNA_ASSIST. The results were identical to the tests using Engineering B chips and 2.0.0-8 of the softdevice. The RF burst precedes the PA turn on signal by exactly 8usec. There is no jitter on the timing and is the same for all 3 advertising bursts. Please reference the screen capture from my scope. The green trace is the RF power as measured on an RF power detector. Please advise. See scope image below. link to scope image

  • FormerMember
    0 FormerMember in reply to FormerMember

    Okay, I see.

    The radio needs some time to stabilize before it starts to transmit. Could you add pin-toggling for the event RADIO -> EVENTS_READY , to check if it occurs before or after the PA signal? You can use PPI fork to "transfer" the event to a GPIO.

  • I noticed you updated your commented. Referring to your earlier post, the radio notification signal does occur substantially before the Tx even, however since one would not be able to distinguish between Tx and Rx events it isn't well suited to driving a power amplifier and LNA solution. In addition it only comes on once at the start of the 3 burst advertising sequence, which would force the PA to be on during inactive times consuming more battery power. The notification signal relative to the PA_LNA assist signal is shown here link text

    I'm over the limit for the comment field. So the continuation follows...

  • With regard to RADIO->EVENTS_READY, I already did this earlier. I used EVENTS_READY for SET and EVENTS_DISABLED for CLR. Based on the signal modulation, as seen on a spectrum analyzer, it appears that EVENTS_READY does not coincide with the beginning of transmission. It does however coincide precisely with the transmission of the preamble. According to the transmit sequence as shown in the reference manual, EVENTS_READY should occur at the start of the CW transmit phase. However, as I noted it occurs precisely 14usec later, which seems to be the start of the preamble. See scope image. PA_LNA assist in yellow and EVENTS_READY in green. link text

    Also, yes you are correct. A power amplifier should have some time to stabilize before transmission occurs. Most power amplifiers your clients would use need about 1usec.

Related