mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-30 20:47:22 +00:00
nimble/phy: Fix wfr time calculations
Rewritten code works with new T_IFS control and fixes few issues: * delay of RX pipeline is included in calculation (time between access address in the air and EVENTS_ADDRESS) * delay of TX pipeline of preceding packet is also included * TX->RX transition should be adjusted by only 2 usecs for clock accuracy since jitter is intended for wake ups only * we do not need to adjust for jitter at all since this is covered by LL and included in wfr_time * strange workaround for LE Coded is not needed anymore since this is now covered by TX/RX pipelines delays which were missing pieces of the puzzle X-Original-Commit: c4bf3324d65e47aa5cd8510784c825344cdcafc9
This commit is contained in:
@@ -134,7 +134,7 @@ void ble_phy_disable(void);
|
||||
#define BLE_PHY_WFR_ENABLE_TXRX (1)
|
||||
|
||||
void ble_phy_stop_usec_timer(void);
|
||||
void ble_phy_wfr_enable(int txrx, uint32_t wfr_usecs);
|
||||
void ble_phy_wfr_enable(int txrx, uint8_t tx_phy_mode, uint32_t wfr_usecs);
|
||||
|
||||
/* Starts rf clock */
|
||||
void ble_phy_rfclk_enable(void);
|
||||
|
||||
@@ -1533,7 +1533,7 @@ ble_ll_conn_event_start_cb(struct ble_ll_sched_item *sch)
|
||||
*/
|
||||
usecs = connsm->slave_cur_tx_win_usecs + 61 +
|
||||
(2 * connsm->slave_cur_window_widening);
|
||||
ble_phy_wfr_enable(BLE_PHY_WFR_ENABLE_RX, usecs);
|
||||
ble_phy_wfr_enable(BLE_PHY_WFR_ENABLE_RX, 0, usecs);
|
||||
/* Set next wakeup time to connection event end time */
|
||||
rc = BLE_LL_SCHED_STATE_RUNNING;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ ble_ll_aux_scan_cb(struct ble_ll_sched_item *sch)
|
||||
}
|
||||
|
||||
STATS_INC(ble_ll_stats, aux_fired_for_read);
|
||||
ble_phy_wfr_enable(BLE_PHY_WFR_ENABLE_RX, BLE_LL_SCHED_ADV_MAX_USECS);
|
||||
ble_phy_wfr_enable(BLE_PHY_WFR_ENABLE_RX, 0, BLE_LL_SCHED_ADV_MAX_USECS);
|
||||
|
||||
done:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user