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 5b27646d43f..ff94a69d3ce 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c @@ -478,7 +478,7 @@ static void isr_done(void *param) #if defined(CONFIG_BT_CTLR_ADV_EXT) if (lll->aux) { lll_adv_aux_offset_fill(lll->aux->ticks_offset, - start_us + 1, pdu); + start_us, pdu); } #else /* !CONFIG_BT_CTLR_ADV_EXT */ ARG_UNUSED(pdu); diff --git a/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c b/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c index ee730f62eb0..abc712f9f7f 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c +++ b/subsys/bluetooth/controller/ll_sw/ull_adv_aux.c @@ -710,11 +710,20 @@ static void mfy_aux_offset_get(void *param) LL_ASSERT(id != TICKER_NULL); } while (id != ticker_id); - /* NOTE: as remainder not used in scheduling primary PDU - * packet timer starts transmission after 1 tick hence the +1. + /* Store the ticks offset for population in other advertising primary + * channel PDUs. */ - aux->lll.ticks_offset = ticks_to_expire + 1; + aux->lll.ticks_offset = ticks_to_expire; + /* NOTE: as remainder used in scheduling primary PDU not available, + * compensate with a probable jitter of one ticker resolution unit that + * would be included in the packet timer capture when scheduling next + * advertising primary channel PDU. + */ + aux->lll.ticks_offset += + HAL_TICKER_US_TO_TICKS(EVENT_TICKER_RES_MARGIN_US); + + /* FIXME: we are in ULL_LOW context, fill offset in LLL context */ pdu = lll_adv_data_curr_get(&adv->lll); lll_adv_aux_offset_fill(ticks_to_expire, 0, pdu); }