@@ -626,6 +626,10 @@ static inline void isr_radio_state_tx(void)
626
626
hcto -= radio_tx_chain_delay_get (0 , 0 );
627
627
628
628
radio_tmr_hcto_configure (hcto );
629
+
630
+ /* capture end of CONNECT_IND PDU, used for calculating first
631
+ * slave event.
632
+ */
629
633
radio_tmr_end_capture ();
630
634
631
635
#if defined(CONFIG_BT_CTLR_SCAN_REQ_RSSI )
@@ -698,7 +702,10 @@ static inline void isr_radio_state_tx(void)
698
702
#endif /* !CONFIG_BT_CTLR_PHY */
699
703
700
704
radio_tmr_hcto_configure (hcto );
705
+
706
+ #if defined(CONFIG_BT_CTLR_PROFILE_ISR )
701
707
radio_tmr_end_capture ();
708
+ #endif /* CONFIG_BT_CTLR_PROFILE_ISR */
702
709
703
710
/* Route the tx packet to respective connections */
704
711
/* TODO: use timebox for tx enqueue (instead of 1 packet
@@ -1405,8 +1412,6 @@ static inline u32_t isr_rx_scan(u8_t devmatch_ok, u8_t devmatch_id,
1405
1412
/* assert if radio packet ptr is not set and radio started tx */
1406
1413
LL_ASSERT (!radio_is_ready ());
1407
1414
1408
- radio_tmr_end_capture ();
1409
-
1410
1415
/* block CPU so that there is no CRC error on pdu tx,
1411
1416
* this is only needed if we want the CPU to sleep.
1412
1417
* while(!radio_has_disabled())
@@ -1604,6 +1609,8 @@ static inline u32_t isr_rx_scan(u8_t devmatch_ok, u8_t devmatch_id,
1604
1609
radio_tmr_tifs_set (RADIO_TIFS );
1605
1610
radio_switch_complete_and_rx (0 );
1606
1611
radio_pkt_tx_set (pdu_adv_tx );
1612
+
1613
+ /* capture end of Tx-ed PDU, used to calculate HCTO. */
1607
1614
radio_tmr_end_capture ();
1608
1615
1609
1616
/* assert if radio packet ptr is not set and radio started tx */
@@ -3351,6 +3358,7 @@ static inline void isr_rx_conn(u8_t crc_ok, u8_t trx_done,
3351
3358
radio_switch_complete_and_rx (0 );
3352
3359
#endif /* !CONFIG_BT_CTLR_PHY */
3353
3360
3361
+ /* capture end of Tx-ed PDU, used to calculate HCTO. */
3354
3362
radio_tmr_end_capture ();
3355
3363
}
3356
3364
@@ -3568,6 +3576,7 @@ static inline u32_t isr_close_adv(void)
3568
3576
3569
3577
radio_tx_enable ();
3570
3578
3579
+ /* capture end of Tx-ed PDU, used to calculate HCTO. */
3571
3580
radio_tmr_end_capture ();
3572
3581
} else {
3573
3582
struct pdu_adv * pdu_adv ;
@@ -3633,6 +3642,9 @@ static inline u32_t isr_close_scan(void)
3633
3642
3634
3643
radio_rx_enable ();
3635
3644
3645
+ /* capture end of Rx-ed PDU, for initiator to calculate first
3646
+ * master event.
3647
+ */
3636
3648
radio_tmr_end_capture ();
3637
3649
} else {
3638
3650
radio_filter_disable ();
@@ -5705,6 +5717,8 @@ static void event_adv(u32_t ticks_at_expire, u32_t remainder,
5705
5717
ticks_at_expire +
5706
5718
TICKER_US_TO_TICKS (RADIO_TICKER_START_PART_US ),
5707
5719
_radio .remainder_anchor );
5720
+
5721
+ /* capture end of Tx-ed PDU, used to calculate HCTO. */
5708
5722
radio_tmr_end_capture ();
5709
5723
5710
5724
#if (defined(CONFIG_BT_CTLR_XTAL_ADVANCED ) && \
@@ -6061,6 +6075,10 @@ static void event_scan(u32_t ticks_at_expire, u32_t remainder, u16_t lazy,
6061
6075
ticks_at_expire +
6062
6076
TICKER_US_TO_TICKS (RADIO_TICKER_START_PART_US ),
6063
6077
_radio .remainder_anchor );
6078
+
6079
+ /* capture end of Rx-ed PDU, for initiator to calculate first
6080
+ * master event.
6081
+ */
6064
6082
radio_tmr_end_capture ();
6065
6083
6066
6084
#if (defined(CONFIG_BT_CTLR_XTAL_ADVANCED ) && \
@@ -7825,7 +7843,10 @@ static void event_slave(u32_t ticks_at_expire, u32_t remainder, u16_t lazy,
7825
7843
#endif /* !CONFIG_BT_CTLR_PHY */
7826
7844
7827
7845
radio_tmr_hcto_configure (hcto );
7846
+
7847
+ #if defined(CONFIG_BT_CTLR_PROFILE_ISR )
7828
7848
radio_tmr_end_capture ();
7849
+ #endif /* CONFIG_BT_CTLR_PROFILE_ISR */
7829
7850
7830
7851
#if defined(CONFIG_BT_CTLR_CONN_RSSI )
7831
7852
radio_rssi_measure ();
@@ -7952,6 +7973,8 @@ static void event_master(u32_t ticks_at_expire, u32_t remainder, u16_t lazy,
7952
7973
radio_tmr_start (1 , ticks_at_expire +
7953
7974
TICKER_US_TO_TICKS (RADIO_TICKER_START_PART_US ),
7954
7975
_radio .remainder_anchor );
7976
+
7977
+ /* capture end of Tx-ed PDU, used to calculate HCTO. */
7955
7978
radio_tmr_end_capture ();
7956
7979
#if SILENT_CONNECTION
7957
7980
/* silent connection! */
0 commit comments