@@ -293,11 +293,45 @@ uint32_t radio_rx_chain_delay_get(uint8_t phy, uint8_t flags)
293
293
294
294
void radio_rx_enable (void )
295
295
{
296
+ #if !defined(CONFIG_BT_CTLR_TIFS_HW )
297
+ #if defined(CONFIG_SOC_SERIES_NRF53X )
298
+ /* NOTE: Timer clear DPPI configuration is needed only for nRF53
299
+ * because of calls to radio_disable() and
300
+ * radio_switch_complete_and_disable() inside a radio event call
301
+ * hal_radio_sw_switch_disable(), which in the case of nRF53
302
+ * cancels the task subscription.
303
+ */
304
+ /* FIXME: hal_sw_switch_timer_clear_ppi_config() sets both task and
305
+ * event. Consider a new interface to only set the task, or
306
+ * change the design to not clear task subscription inside a
307
+ * radio event but when the radio event is done.
308
+ */
309
+ hal_sw_switch_timer_clear_ppi_config ();
310
+ #endif /* CONFIG_SOC_SERIES_NRF53X */
311
+ #endif /* !CONFIG_BT_CTLR_TIFS_HW */
312
+
296
313
nrf_radio_task_trigger (NRF_RADIO , NRF_RADIO_TASK_RXEN );
297
314
}
298
315
299
316
void radio_tx_enable (void )
300
317
{
318
+ #if !defined(CONFIG_BT_CTLR_TIFS_HW )
319
+ #if defined(CONFIG_SOC_SERIES_NRF53X )
320
+ /* NOTE: Timer clear DPPI configuration is needed only for nRF53
321
+ * because of calls to radio_disable() and
322
+ * radio_switch_complete_and_disable() inside a radio event call
323
+ * hal_radio_sw_switch_disable(), which in the case of nRF53
324
+ * cancels the task subscription.
325
+ */
326
+ /* FIXME: hal_sw_switch_timer_clear_ppi_config() sets both task and
327
+ * event. Consider a new interface to only set the task, or
328
+ * change the design to not clear task subscription inside a
329
+ * radio event but when the radio event is done.
330
+ */
331
+ hal_sw_switch_timer_clear_ppi_config ();
332
+ #endif /* CONFIG_SOC_SERIES_NRF53X */
333
+ #endif /* !CONFIG_BT_CTLR_TIFS_HW */
334
+
301
335
nrf_radio_task_trigger (NRF_RADIO , NRF_RADIO_TASK_TXEN );
302
336
}
303
337
@@ -739,6 +773,20 @@ uint32_t radio_tmr_start_tick(uint8_t trx, uint32_t tick)
739
773
#if defined(CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER )
740
774
last_pdu_end_us = 0U ;
741
775
#endif /* CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER */
776
+ #if defined(CONFIG_SOC_SERIES_NRF53X )
777
+ /* NOTE: Timer clear DPPI configuration is needed only for nRF53
778
+ * because of calls to radio_disable() and
779
+ * radio_switch_complete_and_disable() inside a radio event call
780
+ * hal_radio_sw_switch_disable(), which in the case of nRF53
781
+ * cancels the task subscription.
782
+ */
783
+ /* FIXME: hal_sw_switch_timer_clear_ppi_config() sets both task and
784
+ * event. Consider a new interface to only set the task, or
785
+ * change the design to not clear task subscription inside a
786
+ * radio event but when the radio event is done.
787
+ */
788
+ hal_sw_switch_timer_clear_ppi_config ();
789
+ #endif /* CONFIG_SOC_SERIES_NRF53X */
742
790
#endif /* !CONFIG_BT_CTLR_TIFS_HW */
743
791
744
792
return remainder_us ;
@@ -757,6 +805,23 @@ uint32_t radio_tmr_start_now(uint8_t trx)
757
805
758
806
hal_radio_enable_on_tick_ppi_config_and_enable (trx );
759
807
808
+ #if !defined(CONFIG_BT_CTLR_TIFS_HW )
809
+ #if defined(CONFIG_SOC_SERIES_NRF53X )
810
+ /* NOTE: Timer clear DPPI configuration is needed only for nRF53
811
+ * because of calls to radio_disable() and
812
+ * radio_switch_complete_and_disable() inside a radio event call
813
+ * hal_radio_sw_switch_disable(), which in the case of nRF53
814
+ * cancels the task subscription.
815
+ */
816
+ /* FIXME: hal_sw_switch_timer_clear_ppi_config() sets both task and
817
+ * event. Consider a new interface to only set the task, or
818
+ * change the design to not clear task subscription inside a
819
+ * radio event but when the radio event is done.
820
+ */
821
+ hal_sw_switch_timer_clear_ppi_config ();
822
+ #endif /* CONFIG_SOC_SERIES_NRF53X */
823
+ #endif /* !CONFIG_BT_CTLR_TIFS_HW */
824
+
760
825
/* Capture the current time */
761
826
nrf_timer_task_trigger (EVENT_TIMER , NRF_TIMER_TASK_CAPTURE1 );
762
827
now = EVENT_TIMER -> CC [1 ];
0 commit comments