fix(openthread): calibrate CSL tx parameters

This commit is contained in:
Tan Yan Quan
2025-03-13 14:21:09 +08:00
parent dc2500bd08
commit 70bbe45f32
3 changed files with 3 additions and 10 deletions

View File

@ -75,7 +75,7 @@ menu "IEEE 802.15.4"
config IEEE802154_TIMING_OPTIMIZATION
bool "Enable throughput optimization"
depends on IEEE802154_ENABLED
default n
default y
help
Enabling this option increases throughput by ~5% at the expense of ~2.1k
IRAM code size increase.

View File

@ -276,7 +276,6 @@ menu "OpenThread"
help
Select this option to enable CSL feature
menu "CSL Configurations"
depends on OPENTHREAD_CSL_ENABLE
config OPENTHREAD_CSL_ACCURACY
int "The current CSL rx/tx scheduling drift, in units of ± ppm"

View File

@ -38,10 +38,8 @@
#define ESP_RECEIVE_SENSITIVITY -120
#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_UNCERTAIN CONFIG_OPENTHREAD_CSL_UNCERTAIN
#endif
#define EVENT_TX_DONE (1 << 0)
#define EVENT_TX_FAILED (1 << 1)
@ -581,6 +579,8 @@ otError otPlatRadioEnableCsl(otInstance *aInstance, uint32_t aCslPeriod, otShort
return OT_ERROR_NONE;
}
#endif
uint8_t otPlatRadioGetCslAccuracy(otInstance *aInstance)
{
return ESP_OPENTHREAD_CSL_ACCURACY;
@ -591,8 +591,6 @@ uint8_t otPlatRadioGetCslUncertainty(otInstance *aInstance)
return ESP_OPENTHREAD_CSL_UNCERTAIN;
}
#endif
// events
void IRAM_ATTR esp_ieee802154_transmit_done(const uint8_t *frame, const uint8_t *ack,
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.mLqi = frame_info->lqi;
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;
#endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
}
static esp_err_t IRAM_ATTR enh_ack_set_security_addr_and_key(otRadioFrame *ack_frame)