diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c index 9595e685fd4..1e10c8e71a8 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c @@ -641,6 +641,15 @@ uint32_t radio_is_done(void) } #endif /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER */ +uint32_t radio_is_tx_done(void) +{ + if (IS_ENABLED(CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER)) { + return radio_is_done(); + } else { + return 1U; + } +} + uint32_t radio_has_disabled(void) { return (NRF_RADIO->EVENTS_DISABLED != 0); diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.h b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.h index b655d04e84c..ae334df9af5 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.h +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.h @@ -86,6 +86,7 @@ void radio_status_reset(void); uint32_t radio_is_ready(void); uint32_t radio_is_address(void); uint32_t radio_is_done(void); +uint32_t radio_is_tx_done(void); uint32_t radio_has_disabled(void); uint32_t radio_is_idle(void); diff --git a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c index a4b6d0dd3ad..8334f35ebf8 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c @@ -1303,6 +1303,11 @@ static void isr_done(void *param) { struct lll_adv *lll; + /* Call to ensure packet/event timer accumulates the elapsed time + * under single timer use. + */ + (void)radio_is_tx_done(); + /* Clear radio status and events */ lll_isr_status_reset(); diff --git a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv_aux.c b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv_aux.c index 1efbdf432b6..731ca94ed50 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv_aux.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv_aux.c @@ -581,6 +581,11 @@ static void isr_tx_rx(void *param) node_rx_prof = lll_prof_reserve(); } + /* Call to ensure packet/event timer accumulates the elapsed time + * under single timer use. + */ + (void)radio_is_tx_done(); + /* Clear radio tx status and events */ lll_isr_tx_status_reset();