Skip to content

Commit

Permalink
Bluetooth: Controller: Fix Extended Advertising Power Amp setup
Browse files Browse the repository at this point in the history
Fix Extended Advertising implementation to setup Power
Amplifier (PA) GPIO toggle for transmission instead of
incorrect Low Noise Amplifier (LNA) setup which is for
reception.

Relates to commit 4e52909 ("Bluetooth: Controller: Fix
Periodic Advertising to setup Power Amp").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information
cvinayak authored and carlescufi committed Mar 9, 2022
1 parent 681127f commit d510663
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,20 +378,22 @@ static void isr_tx_chain(void *param)
*/
radio_tmr_end_capture();

#if defined(HAL_RADIO_GPIO_HAVE_LNA_PIN)
#if defined(HAL_RADIO_GPIO_HAVE_PA_PIN)
if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) {
/* PA/LNA enable is overwriting packet end used in ISR
* profiling, hence back it up for later use.
*/
lll_prof_radio_end_backup();
}

radio_gpio_lna_setup();
radio_gpio_pa_lna_enable(radio_tmr_tifs_base_get() + EVENT_B2B_MAFS_US -
4 - radio_tx_chain_delay_get(lll->phy_s,
lll->phy_flags) -
HAL_RADIO_GPIO_LNA_OFFSET);
#endif /* HAL_RADIO_GPIO_HAVE_LNA_PIN */
radio_gpio_pa_setup();
radio_gpio_pa_lna_enable(radio_tmr_tifs_base_get() +
EVENT_B2B_MAFS_US -
(EVENT_CLOCK_JITTER_US << 1U) -
radio_tx_chain_delay_get(lll->phy_s,
lll->phy_flags) -
HAL_RADIO_GPIO_PA_OFFSET);
#endif /* HAL_RADIO_GPIO_HAVE_PA_PIN */

if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) {
lll_prof_send();
Expand Down

0 comments on commit d510663

Please sign in to comment.