Skip to content

Commit 5115cdd

Browse files
committed
Bluetooth: Controller: Tune aux offset calculation overhead assertion
Tune the aux offset calculation overhead assertion to use EVENT_OVERHEAD_START_US; this is the correct maximum overhead causing ISR latency for start of a radio event that occurs thereafter. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent ba65ff3 commit 5115cdd

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_vendor.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818
#if defined(CONFIG_BT_CTLR_ADV_EXT)
1919
#if defined(CONFIG_BT_OBSERVER)
2020
#if defined(CONFIG_BT_CTLR_PHY_CODED)
21-
/* Active connection in peripheral role with extended scanning on 1M and Coded
22-
* PHY, scheduling and receiving auxiliary PDUs.
21+
/* Simultaneous 3 extended advertising sets with extended scanning on 1M and Coded PHY, scheduling
22+
* and receiving auxiliary PDUs.
2323
*/
24-
#define EVENT_OVERHEAD_START_US 733 /* 24 RTC ticks */
24+
#define EVENT_OVERHEAD_START_US 580 /* 19 RTC ticks */
2525
#else /* !CONFIG_BT_CTLR_PHY_CODED */
26-
/* Active connection in peripheral role with extended scanning on 1M only,
27-
* scheduling and receiving auxiliary PDUs.
26+
/* Simultaneous 2 extended advertising sets with extended scanning on 1M and Coded PHY, scheduling
27+
* and receiving auxiliary PDUs.
2828
*/
2929
#define EVENT_OVERHEAD_START_US 428 /* 14 RTC ticks */
3030
#endif /* !CONFIG_BT_CTLR_PHY_CODED */
3131
#else /* !CONFIG_BT_OBSERVER */
32-
/* Active connection in peripheral role with legacy scanning on 1M.
32+
/* Simultaneous 3 extended advertising sets calculating aux offsets.
3333
*/
34-
#define EVENT_OVERHEAD_START_US 275 /* 9 RTC ticks */
34+
#define EVENT_OVERHEAD_START_US 367 /* 12 RTC ticks */
3535
#endif /* !CONFIG_BT_OBSERVER */
3636
#else /* !CONFIG_BT_CTLR_ADV_EXT */
3737
/* Active connection in peripheral role with additional advertising state.

subsys/bluetooth/controller/ll_sw/ull_adv_aux.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3324,9 +3324,10 @@ static void mfy_aux_offset_get(void *param)
33243324
/* Assertion check for delayed aux_offset calculations */
33253325
ticks_now = ticker_ticks_now_get();
33263326
ticks_elapsed = ticker_ticks_diff_get(ticks_now, ticks_current);
3327-
ticks_to_start = HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_XTAL_US) -
3328-
HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_PREEMPT_MIN_US);
3329-
LL_ASSERT(ticks_elapsed < ticks_to_start);
3327+
ticks_to_start = HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_START_US);
3328+
LL_ASSERT_MSG((ticks_elapsed < ticks_to_start), "%s overhead = %u (%u) us.",
3329+
__func__, HAL_TICKER_TICKS_TO_US(ticks_elapsed),
3330+
HAL_TICKER_TICKS_TO_US(ticks_to_start));
33303331
}
33313332

33323333
static void ticker_op_cb(uint32_t status, void *param)

0 commit comments

Comments
 (0)