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 17e2bd282be..c63883bf4b2 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 @@ -596,6 +596,7 @@ void radio_status_reset(void) * EVENT_* registers are not reset to save code and CPU time. */ nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_READY); + nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_ADDRESS); nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_END); #if defined(CONFIG_BT_CTLR_DF_SUPPORT) && !defined(CONFIG_ZTEST) /* Clear it only for SoCs supporting DF extension */ @@ -616,6 +617,11 @@ uint32_t radio_is_ready(void) return (NRF_RADIO->EVENTS_READY != 0); } +uint32_t radio_is_address(void) +{ + return (NRF_RADIO->EVENTS_ADDRESS != 0); +} + #if defined(CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER) static uint32_t last_pdu_end_us; 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 fbc79906a2c..f2a99cfc552 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 @@ -84,6 +84,7 @@ void radio_disable(void); 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_has_disabled(void); uint32_t radio_is_idle(void); diff --git a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c index d17c66d6778..131fcde4d48 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c @@ -397,10 +397,10 @@ void lll_conn_isr_rx(void *param) /* assert if radio packet ptr is not set and radio started tx */ if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { - LL_ASSERT_MSG(!radio_is_ready(), "%s: Radio ISR latency: %u", __func__, + LL_ASSERT_MSG(!radio_is_address(), "%s: Radio ISR latency: %u", __func__, lll_prof_latency_get()); } else { - LL_ASSERT(!radio_is_ready()); + LL_ASSERT(!radio_is_address()); } lll_conn_isr_rx_exit: @@ -576,10 +576,10 @@ void lll_conn_isr_tx(void *param) /* assert if radio packet ptr is not set and radio started rx */ if (IS_ENABLED(CONFIG_BT_CTLR_PROFILE_ISR)) { - LL_ASSERT_MSG(!radio_is_ready(), "%s: Radio ISR latency: %u", __func__, + LL_ASSERT_MSG(!radio_is_address(), "%s: Radio ISR latency: %u", __func__, lll_prof_latency_get()); } else { - LL_ASSERT(!radio_is_ready()); + LL_ASSERT(!radio_is_address()); } #if defined(CONFIG_BT_CTLR_DF_CONN_CTE_TX)