Skip to content

Commit

Permalink
fixup! Bluetooth: Controller: Fix radio_tmr_start_us for single timer…
Browse files Browse the repository at this point in the history
… use

This commit addresses two bugs in use of single timer s/w
switch implementation, incorrect aux_offset in subsequent
ADV_EXT_IND and ISO receiver failing to receive second or
greater BIS subevents.

Fix radio_tmr_start_now implementation to consider the
initial latency in starting the event timer in single timer
use mode. This fixes the incorrect aux_offset in ADV_EXT_IND
PDUs.

Fix radio_tmr_start_us implementation for single timer use,
as the timer is reset on every radio end, and hence the
requested start_us has to be adjusted for the accumulated
last_end_pdu_us value. This fixes the BIS subevent
receptions.

Also, fix the maximum radio ISR latency value used in
radio_tmr_start_us to consider the maximum Rx chain delay
and maximum radio ramp up delays. 80 us + ~30 us + ~40 us
should be able to meet the 150 us tIFS duration.

Relates to commit bcd28e0 ("Bluetooth: Controller: Fix
sw switch single timer for spurious TXEN/RXEN").

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
  • Loading branch information
cvinayak committed Dec 29, 2024
1 parent e3e0274 commit 37220b1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1868,7 +1868,11 @@ uint32_t radio_tmr_end_get(void)

uint32_t radio_tmr_tifs_base_get(void)
{
#if defined(CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER)
return 0U;
#else /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER */
return radio_tmr_end_get();
#endif /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER */
}

#if defined(CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER)
Expand Down

0 comments on commit 37220b1

Please sign in to comment.