Skip to content

Commit 439cd0b

Browse files
cvinayakkartben
authored andcommitted
Bluetooth: Controller: Minor fix defines and conditional compilations
Replace use of HAL_RADIO_RECV_TIMEOUT_CANCEL_PPI with HAL_TRIGGER_CRYPT_PPI; they have same value but use the correctly named HAL_TRIGGER_CRYPT_PPI define now. Fix conditional compile to correctly exclude reference of NRF_CCM when CONFIG_BT_CTLR_PRIVACY=n. Fix missing reference to CCM_TASKS_CRYPT_DELAY_BITS when CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER=y. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 1508aa4 commit 439cd0b

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static inline void hal_event_timer_start_ppi_config(void)
105105
nrf_grtc_publish_set(NRF_GRTC, HAL_CNTR_GRTC_EVENT_COMPARE_RADIO,
106106
HAL_EVENT_TIMER_START_PPI);
107107

108-
/* Enable same DPPI in Global domain */
108+
/* Enable same DPPI in Peripheral domain */
109109
nrf_dppi_channels_enable(NRF_DPPIC20,
110110
BIT(HAL_EVENT_TIMER_START_PPI));
111111

@@ -148,8 +148,8 @@ static inline void hal_radio_ready_time_capture_ppi_config(void)
148148
static inline void hal_trigger_crypt_ppi_config(void)
149149
{
150150
nrf_radio_publish_set(NRF_RADIO,
151-
NRF_RADIO_EVENT_ADDRESS, HAL_RADIO_RECV_TIMEOUT_CANCEL_PPI);
152-
nrf_ccm_subscribe_set(NRF_CCM, NRF_CCM_TASK_START, HAL_RADIO_RECV_TIMEOUT_CANCEL_PPI);
151+
NRF_RADIO_EVENT_ADDRESS, HAL_TRIGGER_CRYPT_PPI);
152+
nrf_ccm_subscribe_set(NRF_CCM, NRF_CCM_TASK_START, HAL_TRIGGER_CRYPT_PPI);
153153
}
154154

155155
/*******************************************************************************
@@ -160,6 +160,7 @@ static inline void hal_trigger_crypt_ppi_disable(void)
160160
nrf_ccm_subscribe_clear(NRF_CCM, NRF_CCM_TASK_START);
161161
}
162162

163+
#if defined(CONFIG_BT_CTLR_PRIVACY)
163164
/*******************************************************************************
164165
* Trigger automatic address resolution on Bit counter match:
165166
* wire the RADIO EVENTS_BCMATCH event to the AAR TASKS_START task.
@@ -169,6 +170,7 @@ static inline void hal_trigger_aar_ppi_config(void)
169170
nrf_radio_publish_set(NRF_RADIO, NRF_RADIO_EVENT_BCMATCH, HAL_TRIGGER_AAR_PPI);
170171
nrf_aar_subscribe_set(NRF_AAR, NRF_AAR_TASK_START, HAL_TRIGGER_AAR_PPI);
171172
}
173+
#endif /* CONFIG_BT_CTLR_PRIVACY */
172174

173175
/* When hardware does not support Coded PHY we still allow the Controller
174176
* implementation to accept Coded PHY flags, but the Controller will use 1M

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
*/
6363
#define HAL_RADIO_ISR_LATENCY_MAX_US 80U
6464

65+
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RX)
66+
/* Delay of CCM TASKS_CRYPT start in number of bits for Radio Bit counter */
67+
#define CCM_TASKS_CRYPT_DELAY_BITS 3
68+
#endif /* CONFIG_BT_CTLR_DF_CONN_CTE_RX */
69+
6570
#if defined(CONFIG_BT_CTLR_PHY_CODED)
6671
#define SW_SWITCH_TIMER_EVTS_COMP_BASE 4
6772
#define SW_SWITCH_TIMER_EVTS_COMP_S2_BASE 6
@@ -181,8 +186,10 @@
181186
/* Delay of EVENTS_PHYEND event on receive PDU without CTE included when CTEINLINE is enabled */
182187
#define RADIO_EVENTS_PHYEND_DELAY_US 16
183188

189+
#if defined(CONFIG_BT_CTLR_DF_CONN_CTE_RX)
184190
/* Delay of CCM TASKS_CRYPT start in number of bits for Radio Bit counter */
185191
#define CCM_TASKS_CRYPT_DELAY_BITS 3
192+
#endif /* CONFIG_BT_CTLR_DF_CONN_CTE_RX */
186193

187194
#else /* !CONFIG_BT_CTLR_DF */
188195
/* Wrapper for EVENTS_END event generated by Radio peripheral at the very end of the transmission

0 commit comments

Comments
 (0)