mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
fix(openthread): calibrate CSL tx parameters
This commit is contained in:
@ -75,7 +75,7 @@ menu "IEEE 802.15.4"
|
|||||||
config IEEE802154_TIMING_OPTIMIZATION
|
config IEEE802154_TIMING_OPTIMIZATION
|
||||||
bool "Enable throughput optimization"
|
bool "Enable throughput optimization"
|
||||||
depends on IEEE802154_ENABLED
|
depends on IEEE802154_ENABLED
|
||||||
default n
|
default y
|
||||||
help
|
help
|
||||||
Enabling this option increases throughput by ~5% at the expense of ~2.1k
|
Enabling this option increases throughput by ~5% at the expense of ~2.1k
|
||||||
IRAM code size increase.
|
IRAM code size increase.
|
||||||
|
@ -276,7 +276,6 @@ menu "OpenThread"
|
|||||||
help
|
help
|
||||||
Select this option to enable CSL feature
|
Select this option to enable CSL feature
|
||||||
menu "CSL Configurations"
|
menu "CSL Configurations"
|
||||||
depends on OPENTHREAD_CSL_ENABLE
|
|
||||||
config OPENTHREAD_CSL_ACCURACY
|
config OPENTHREAD_CSL_ACCURACY
|
||||||
int "The current CSL rx/tx scheduling drift, in units of ± ppm"
|
int "The current CSL rx/tx scheduling drift, in units of ± ppm"
|
||||||
|
|
||||||
|
@ -38,10 +38,8 @@
|
|||||||
|
|
||||||
#define ESP_RECEIVE_SENSITIVITY -120
|
#define ESP_RECEIVE_SENSITIVITY -120
|
||||||
#define ESP_OPENTHREAD_XTAL_ACCURACY CONFIG_OPENTHREAD_XTAL_ACCURACY
|
#define ESP_OPENTHREAD_XTAL_ACCURACY CONFIG_OPENTHREAD_XTAL_ACCURACY
|
||||||
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
|
|
||||||
#define ESP_OPENTHREAD_CSL_ACCURACY CONFIG_OPENTHREAD_CSL_ACCURACY
|
#define ESP_OPENTHREAD_CSL_ACCURACY CONFIG_OPENTHREAD_CSL_ACCURACY
|
||||||
#define ESP_OPENTHREAD_CSL_UNCERTAIN CONFIG_OPENTHREAD_CSL_UNCERTAIN
|
#define ESP_OPENTHREAD_CSL_UNCERTAIN CONFIG_OPENTHREAD_CSL_UNCERTAIN
|
||||||
#endif
|
|
||||||
|
|
||||||
#define EVENT_TX_DONE (1 << 0)
|
#define EVENT_TX_DONE (1 << 0)
|
||||||
#define EVENT_TX_FAILED (1 << 1)
|
#define EVENT_TX_FAILED (1 << 1)
|
||||||
@ -581,6 +579,8 @@ otError otPlatRadioEnableCsl(otInstance *aInstance, uint32_t aCslPeriod, otShort
|
|||||||
return OT_ERROR_NONE;
|
return OT_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance)
|
uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance)
|
||||||
{
|
{
|
||||||
return ESP_OPENTHREAD_CSL_ACCURACY;
|
return ESP_OPENTHREAD_CSL_ACCURACY;
|
||||||
@ -591,8 +591,6 @@ uint8_t otPlatRadioGetCslUncertainty(otInstance *aInstance)
|
|||||||
return ESP_OPENTHREAD_CSL_UNCERTAIN;
|
return ESP_OPENTHREAD_CSL_UNCERTAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// events
|
// events
|
||||||
void IRAM_ATTR esp_ieee802154_transmit_done(const uint8_t *frame, const uint8_t *ack,
|
void IRAM_ATTR esp_ieee802154_transmit_done(const uint8_t *frame, const uint8_t *ack,
|
||||||
esp_ieee802154_frame_info_t *ack_frame_info)
|
esp_ieee802154_frame_info_t *ack_frame_info)
|
||||||
@ -620,11 +618,7 @@ static void IRAM_ATTR convert_to_ot_frame(uint8_t *data, esp_ieee802154_frame_in
|
|||||||
radio_frame->mInfo.mRxInfo.mRssi = frame_info->rssi;
|
radio_frame->mInfo.mRxInfo.mRssi = frame_info->rssi;
|
||||||
radio_frame->mInfo.mRxInfo.mLqi = frame_info->lqi;
|
radio_frame->mInfo.mRxInfo.mLqi = frame_info->lqi;
|
||||||
radio_frame->mInfo.mRxInfo.mAckedWithFramePending = frame_info->pending;
|
radio_frame->mInfo.mRxInfo.mAckedWithFramePending = frame_info->pending;
|
||||||
radio_frame->mInfo.mRxInfo.mTimestamp = otPlatTimeGet();
|
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
|
|
||||||
radio_frame->mInfo.mRxInfo.mTimestamp = frame_info->timestamp;
|
radio_frame->mInfo.mRxInfo.mTimestamp = frame_info->timestamp;
|
||||||
#endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static esp_err_t IRAM_ATTR enh_ack_set_security_addr_and_key(otRadioFrame *ack_frame)
|
static esp_err_t IRAM_ATTR enh_ack_set_security_addr_and_key(otRadioFrame *ack_frame)
|
||||||
|
Reference in New Issue
Block a user