Skip to content

Commit 1508aa4

Browse files
cvinayakkartben
authored andcommitted
Bluetooth: Controller: Single timer use ISO Peripheral nRF54L support
Update ISO Peripheral for single timer use support required for nRF54L Series SoCs. As the timer is reset on every radio end, use the radio_tmr_hcto_configure_abs() function to set the header complete timeout correctly when using single timer for s/w switching. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent b6ce1a6 commit 1508aa4

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_peripheral_iso.c

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,6 @@ static void isr_rx(void *param)
462462
struct pdu_cis *pdu_tx;
463463
uint64_t payload_count;
464464
uint8_t payload_index;
465-
uint32_t subevent_us;
466-
uint32_t start_us;
467465
uint8_t trx_done;
468466
uint8_t crc_ok;
469467
uint8_t cie;
@@ -807,6 +805,12 @@ static void isr_rx(void *param)
807805
se_curr = 0U;
808806
}
809807

808+
radio_isr_set(isr_tx, cis_lll);
809+
810+
#if !defined(CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER)
811+
uint32_t subevent_us;
812+
uint32_t start_us;
813+
810814
/* Schedule next subevent reception */
811815
subevent_us = radio_tmr_aa_restore();
812816
subevent_us += cis_lll->offset - cis_offset_first +
@@ -825,8 +829,7 @@ static void isr_rx(void *param)
825829

826830
start_us = radio_tmr_start_us(0U, subevent_us);
827831
LL_ASSERT(start_us == (subevent_us + 1U));
828-
829-
radio_isr_set(isr_tx, cis_lll);
832+
#endif /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER */
830833
}
831834

832835
static void isr_tx(void *param)
@@ -923,8 +926,14 @@ static void isr_tx(void *param)
923926
subevent_us -= radio_rx_chain_delay_get(0U, 0U);
924927
#endif /* !CONFIG_BT_CTLR_PHY */
925928

929+
#if defined(CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER)
930+
start_us = radio_tmr_start_us(0U, subevent_us);
931+
LL_ASSERT(start_us == (subevent_us + 1U));
932+
933+
#else /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER */
926934
/* Compensate for the 1 us added by radio_tmr_start_us() */
927935
start_us = subevent_us + 1U;
936+
#endif /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER */
928937

929938
hcto = start_us +
930939
((EVENT_JITTER_US + EVENT_TICKER_RES_MARGIN_US +
@@ -941,7 +950,7 @@ static void isr_tx(void *param)
941950
hcto += radio_rx_chain_delay_get(0U, 0U);
942951
#endif /* !CONFIG_BT_CTLR_PHY */
943952

944-
radio_tmr_hcto_configure(hcto);
953+
radio_tmr_hcto_configure_abs(hcto);
945954

946955
#if defined(HAL_RADIO_GPIO_HAVE_LNA_PIN)
947956
radio_gpio_lna_setup();
@@ -1172,7 +1181,7 @@ static void isr_prepare_subevent_common(void *param)
11721181
hcto += radio_rx_chain_delay_get(0U, 0U);
11731182
#endif /* !CONFIG_BT_CTLR_PHY */
11741183

1175-
radio_tmr_hcto_configure(hcto);
1184+
radio_tmr_hcto_configure_abs(hcto);
11761185

11771186
#if defined(HAL_RADIO_GPIO_HAVE_LNA_PIN)
11781187
radio_gpio_lna_setup();

0 commit comments

Comments
 (0)