Skip to content

Commit ec76e7f

Browse files
committed
Bluetooth: controller: GPIO PA/LNA support for nRF53x
Ported the GPIO PA/LNA support for nRF53x by using a DPPI channel. Fixes #24142. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent ca6af30 commit ec76e7f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_ppi.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ static inline void hal_radio_sw_switch_ppi_group_setup(void)
611611
#include <nrfx/hal/nrf_rtc.h>
612612
#include <nrfx/hal/nrf_ccm.h>
613613
#include <nrfx/hal/nrf_aar.h>
614+
#include <nrfx/hal/nrf_gpiote.h>
614615

615616
static inline void hal_radio_nrf_ppi_channels_enable(uint32_t mask)
616617
{
@@ -777,6 +778,27 @@ static inline void hal_trigger_rateoverride_ppi_config(void)
777778
HAL_TRIGGER_RATEOVERRIDE_PPI);
778779
}
779780

781+
/******************************************************************************/
782+
#if defined(CONFIG_BT_CTLR_GPIO_PA_PIN) || defined(CONFIG_BT_CTLR_GPIO_LNA_PIN)
783+
784+
#define HAL_ENABLE_PALNA_PPI 5
785+
#define HAL_DISABLE_PALNA_PPI HAL_ENABLE_PALNA_PPI
786+
787+
static inline void hal_palna_ppi_setup(void)
788+
{
789+
nrf_gpiote_task_t task;
790+
791+
nrf_timer_publish_set(EVENT_TIMER, NRF_TIMER_EVENT_COMPARE2,
792+
HAL_ENABLE_PALNA_PPI);
793+
nrf_radio_publish_set(NRF_RADIO, NRF_RADIO_EVENT_DISABLED,
794+
HAL_DISABLE_PALNA_PPI);
795+
796+
task = nrf_gpiote_out_task_get(CONFIG_BT_CTLR_PA_LNA_GPIOTE_CHAN);
797+
nrf_gpiote_subscribe_set(NRF_GPIOTE, task, HAL_DISABLE_PALNA_PPI);
798+
}
799+
800+
#endif /* CONFIG_BT_CTLR_GPIO_PA_PIN || CONFIG_BT_CTLR_GPIO_LNA_PIN */
801+
780802
/******************************************************************************/
781803
#if !defined(CONFIG_BT_CTLR_TIFS_HW)
782804
/* DPPI setup used for SW-based auto-switching during TIFS. */

0 commit comments

Comments
 (0)