Skip to content

Commit 30df476

Browse files
Tronilkartben
authored andcommitted
Bluetooth: Controller: Fix overhead check in ull_scan_aux for SLOT_AGNOSTIC
The current overhead check needlessly flushes some events for CONFIG_BT_TICKER_SLOT_AGNOSTIC resulting in some lost or incomplete advertising events; Use a lower overhead value for this configuration to avoid that Signed-off-by: Troels Nilsson <[email protected]>
1 parent f783e54 commit 30df476

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

subsys/bluetooth/controller/ll_sw/ull_scan_aux.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,13 +2055,18 @@ void ull_scan_aux_setup(memq_link_t *link, struct node_rx_pdu *rx)
20552055
uint32_t ticks_now;
20562056
uint32_t diff;
20572057

2058+
#if defined(CONFIG_BT_TICKER_SLOT_AGNOSTIC)
2059+
/* CPU execution overhead to setup the radio for reception */
2060+
overhead_us = EVENT_OVERHEAD_START_US;
2061+
#else /* !CONFIG_BT_TICKER_SLOT_AGNOSTIC */
20582062
/* CPU execution overhead to setup the radio for reception plus the
20592063
* minimum prepare tick offset. And allow one additional event in
20602064
* between as overhead (say, an advertising event in between got closed
20612065
* when reception for auxiliary PDU is being setup).
20622066
*/
20632067
overhead_us = (EVENT_OVERHEAD_END_US + EVENT_OVERHEAD_START_US +
20642068
HAL_TICKER_TICKS_TO_US(HAL_TICKER_CNTR_CMP_OFFSET_MIN)) << 1;
2069+
#endif /* !CONFIG_BT_TICKER_SLOT_AGNOSTIC */
20652070

20662071
ticks_now = ticker_ticks_now_get();
20672072
ticks_at_expire = ftr->ticks_anchor + ticks_aux_offset -

0 commit comments

Comments
 (0)