Skip to content

Commit 3c60a00

Browse files
committed
Merge branch 'fix/calibrate_csl_rx' into 'master'
fix(openthread): calibrate CSL parameters See merge request espressif/esp-idf!38471
2 parents 6a740a9 + 995858c commit 3c60a00

File tree

4 files changed

+6
-20
lines changed

4 files changed

+6
-20
lines changed

components/openthread/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ menu "OpenThread"
279279
config OPENTHREAD_CSL_ACCURACY
280280
int "The current CSL rx/tx scheduling drift, in units of ± ppm"
281281

282-
default 20
282+
default 50
283283
help
284284
The current accuracy of the clock used for scheduling CSL operations
285285

components/openthread/private_include/esp_openthread_sleep.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -25,16 +25,10 @@ extern "C" {
2525
esp_err_t esp_openthread_sleep_init(void);
2626

2727
/**
28-
* @brief This function performs the OpenThread sleep process.
28+
* @brief This function performs the OpenThread sleep and wake process.
2929
*
3030
*/
3131
void esp_openthread_sleep_process(void);
32-
33-
/**
34-
* @brief This function performs the OpenThread wakeup process.
35-
*
36-
*/
37-
void esp_openthread_wakeup_process(void);
3832
#endif
3933

4034
#ifdef __cplusplus

components/openthread/src/esp_openthread.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -187,9 +187,6 @@ esp_err_t esp_openthread_launch_mainloop(void)
187187
if (select(mainloop.max_fd + 1, &mainloop.read_fds, &mainloop.write_fds, &mainloop.error_fds,
188188
&mainloop.timeout) >= 0) {
189189
esp_openthread_lock_acquire(portMAX_DELAY);
190-
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE && CONFIG_OPENTHREAD_RADIO_NATIVE
191-
esp_openthread_wakeup_process();
192-
#endif /* CONFIG_FREERTOS_USE_TICKLESS_IDLE && CONFIG_OPENTHREAD_RADIO_NATIVE */
193190
error = esp_openthread_platform_process(instance, &mainloop);
194191
while (otTaskletsArePending(instance)) {
195192
otTaskletsProcess(instance);

components/openthread/src/port/esp_openthread_sleep.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -37,12 +37,7 @@ void esp_openthread_sleep_process(void)
3737
if (s_ot_sleep == false && esp_ieee802154_get_state() == ESP_IEEE802154_RADIO_SLEEP) {
3838
esp_pm_lock_release(s_pm_lock);
3939
s_ot_sleep = true;
40-
}
41-
}
42-
43-
void esp_openthread_wakeup_process(void)
44-
{
45-
if (s_ot_sleep) {
40+
} else if (s_ot_sleep && esp_ieee802154_get_state() != ESP_IEEE802154_RADIO_SLEEP) {
4641
esp_pm_lock_acquire(s_pm_lock);
4742
s_ot_sleep = false;
4843
}

0 commit comments

Comments
 (0)