mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-23 10:19:59 +00:00
nimble/phy: Fix timings for LE Coded
e8f9ecca changed values for S2 and S8 phy modes. This did not affect LL
code since it was using symbols everywhere, however in nRF52 PHY timings
are indexed by raw values so LE Coded timings are now used incorrectly.
To avoid such issues in future, let's just index arrays with timings
using proper symbols.
This commit is contained in:
@@ -148,7 +148,12 @@ static const uint8_t g_ble_phy_chan_freq[BLE_PHY_NUM_CHANS] = {
|
||||
|
||||
#if (BLE_LL_BT5_PHY_SUPPORTED == 1)
|
||||
/* packet start offsets (in usecs) */
|
||||
static const uint16_t g_ble_phy_mode_pkt_start_off[BLE_PHY_NUM_MODE] = { 376, 40, 24, 376 };
|
||||
static const uint16_t g_ble_phy_mode_pkt_start_off[BLE_PHY_NUM_MODE] = {
|
||||
[BLE_PHY_MODE_1M] = 40,
|
||||
[BLE_PHY_MODE_2M] = 24,
|
||||
[BLE_PHY_MODE_CODED_125KBPS] = 376,
|
||||
[BLE_PHY_MODE_CODED_500KBPS] = 376
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Various radio timings */
|
||||
@@ -156,13 +161,33 @@ static const uint16_t g_ble_phy_mode_pkt_start_off[BLE_PHY_NUM_MODE] = { 376, 40
|
||||
#define BLE_PHY_T_TXENFAST (XCVR_TX_RADIO_RAMPUP_USECS)
|
||||
#define BLE_PHY_T_RXENFAST (XCVR_RX_RADIO_RAMPUP_USECS)
|
||||
/* delay between EVENTS_READY and start of tx */
|
||||
static const uint8_t g_ble_phy_t_txdelay[BLE_PHY_NUM_MODE] = { 5, 4, 3, 5 };
|
||||
static const uint8_t g_ble_phy_t_txdelay[BLE_PHY_NUM_MODE] = {
|
||||
[BLE_PHY_MODE_1M] = 4,
|
||||
[BLE_PHY_MODE_2M] = 3,
|
||||
[BLE_PHY_MODE_CODED_125KBPS] = 5,
|
||||
[BLE_PHY_MODE_CODED_500KBPS] = 5
|
||||
};
|
||||
/* delay between EVENTS_END and end of txd packet */
|
||||
static const uint8_t g_ble_phy_t_txenddelay[BLE_PHY_NUM_MODE] = { 9, 4, 3, 3 };
|
||||
static const uint8_t g_ble_phy_t_txenddelay[BLE_PHY_NUM_MODE] = {
|
||||
[BLE_PHY_MODE_1M] = 4,
|
||||
[BLE_PHY_MODE_2M] = 3,
|
||||
[BLE_PHY_MODE_CODED_125KBPS] = 9,
|
||||
[BLE_PHY_MODE_CODED_500KBPS] = 3
|
||||
};
|
||||
/* delay between rxd access address (w/ TERM1 for coded) and EVENTS_ADDRESS */
|
||||
static const uint8_t g_ble_phy_t_rxaddrdelay[BLE_PHY_NUM_MODE] = { 17, 6, 2, 17 };
|
||||
static const uint8_t g_ble_phy_t_rxaddrdelay[BLE_PHY_NUM_MODE] = {
|
||||
[BLE_PHY_MODE_1M] = 6,
|
||||
[BLE_PHY_MODE_2M] = 2,
|
||||
[BLE_PHY_MODE_CODED_125KBPS] = 17,
|
||||
[BLE_PHY_MODE_CODED_500KBPS] = 17
|
||||
};
|
||||
/* delay between end of rxd packet and EVENTS_END */
|
||||
static const uint8_t g_ble_phy_t_rxenddelay[BLE_PHY_NUM_MODE] = { 27, 6, 2, 22 };
|
||||
static const uint8_t g_ble_phy_t_rxenddelay[BLE_PHY_NUM_MODE] = {
|
||||
[BLE_PHY_MODE_1M] = 6,
|
||||
[BLE_PHY_MODE_2M] = 2,
|
||||
[BLE_PHY_MODE_CODED_125KBPS] = 27,
|
||||
[BLE_PHY_MODE_CODED_500KBPS] = 22
|
||||
};
|
||||
|
||||
/* Statistics */
|
||||
STATS_SECT_START(ble_phy_stats)
|
||||
|
||||
Reference in New Issue
Block a user