Skip to content

Commit

Permalink
Bluetooth: Controller: Fix ISO Sync Receiver subevent Rx window
Browse files Browse the repository at this point in the history
Fix ISO Synchronized Receiver subevent Rx window timing and
PDU address receive timeout to consider the +/- 2us active
clock jitter.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information
cvinayak authored and carlescufi committed Jan 23, 2024
1 parent 83174ef commit 4a51f68
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync_iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ static void isr_rx(void *param)
hcto -= radio_rx_chain_delay_get(lll->phy, PHY_FLAGS_S8);
hcto -= addr_us_get(lll->phy);
hcto -= radio_rx_ready_delay_get(lll->phy, PHY_FLAGS_S8);
hcto -= (EVENT_CLOCK_JITTER_US << 1);
hcto -= (EVENT_CLOCK_JITTER_US << 1) * nse;

start_us = hcto;
hcto = radio_tmr_start_us(0U, start_us);
Expand All @@ -996,12 +996,11 @@ static void isr_rx(void *param)
*/
/* LL_ASSERT(hcto == (start_us + 1U)); */

/* Add 4 us + 4 us + (4 us * subevents so far), as radio
* was setup to listen 4 us early and subevents could have
* a 4 us drift each until the current subevent we are
* listening.
/* Add 8 us * subevents so far, as radio was setup to listen
* 4 us early and subevents could have a 4 us drift each until
* the current subevent we are listening.
*/
hcto += ((EVENT_CLOCK_JITTER_US << 1) * (2U + nse)) +
hcto += (((EVENT_CLOCK_JITTER_US << 1) * nse) << 1) +
RANGE_DELAY_US + HCTO_START_DELAY_US;
} else {
/* First subevent PDU was not received, hence setup radio packet
Expand Down

0 comments on commit 4a51f68

Please sign in to comment.