Merge branch 'fix/calibrate_csl_rx_v5.3' into 'release/v5.3'

fix(openthread): calibrate CSL parameters (v5.3)

See merge request espressif/esp-idf!38534
This commit is contained in:
Shu Chen
2025-05-08 14:11:43 +08:00
4 changed files with 6 additions and 20 deletions

View File

@ -279,7 +279,7 @@ menu "OpenThread"
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"
default 20 default 50
help help
The current accuracy of the clock used for scheduling CSL operations The current accuracy of the clock used for scheduling CSL operations

View File

@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@ -25,16 +25,10 @@ extern "C" {
esp_err_t esp_openthread_sleep_init(void); esp_err_t esp_openthread_sleep_init(void);
/** /**
* @brief This function performs the OpenThread sleep process. * @brief This function performs the OpenThread sleep and wake process.
* *
*/ */
void esp_openthread_sleep_process(void); void esp_openthread_sleep_process(void);
/**
* @brief This function performs the OpenThread wakeup process.
*
*/
void esp_openthread_wakeup_process(void);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@ -187,9 +187,6 @@ esp_err_t esp_openthread_launch_mainloop(void)
if (select(mainloop.max_fd + 1, &mainloop.read_fds, &mainloop.write_fds, &mainloop.error_fds, if (select(mainloop.max_fd + 1, &mainloop.read_fds, &mainloop.write_fds, &mainloop.error_fds,
&mainloop.timeout) >= 0) { &mainloop.timeout) >= 0) {
esp_openthread_lock_acquire(portMAX_DELAY); esp_openthread_lock_acquire(portMAX_DELAY);
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE && CONFIG_OPENTHREAD_RADIO_NATIVE
esp_openthread_wakeup_process();
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE && CONFIG_OPENTHREAD_RADIO_NATIVE */
error = esp_openthread_platform_process(instance, &mainloop); error = esp_openthread_platform_process(instance, &mainloop);
while (otTaskletsArePending(instance)) { while (otTaskletsArePending(instance)) {
otTaskletsProcess(instance); otTaskletsProcess(instance);

View File

@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@ -37,12 +37,7 @@ void esp_openthread_sleep_process(void)
if (s_ot_sleep == false && esp_ieee802154_get_state() == ESP_IEEE802154_RADIO_SLEEP) { if (s_ot_sleep == false && esp_ieee802154_get_state() == ESP_IEEE802154_RADIO_SLEEP) {
esp_pm_lock_release(s_pm_lock); esp_pm_lock_release(s_pm_lock);
s_ot_sleep = true; s_ot_sleep = true;
} } else if (s_ot_sleep && esp_ieee802154_get_state() != ESP_IEEE802154_RADIO_SLEEP) {
}
void esp_openthread_wakeup_process(void)
{
if (s_ot_sleep) {
esp_pm_lock_acquire(s_pm_lock); esp_pm_lock_acquire(s_pm_lock);
s_ot_sleep = false; s_ot_sleep = false;
} }