From f8994c268a8a277b8b5addd347f12f271dc9fb07 Mon Sep 17 00:00:00 2001 From: zhuanghang Date: Mon, 29 Dec 2025 15:38:48 +0800 Subject: [PATCH] feat(802.15.4): set default pti and ed/cca pti to 3 for 154 --- components/hal/include/hal/ieee802154_common_ll.h | 6 +++--- components/ieee802154/driver/esp_ieee802154_dev.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/hal/include/hal/ieee802154_common_ll.h b/components/hal/include/hal/ieee802154_common_ll.h index 1fe732f2c4..05b3e5ef9d 100644 --- a/components/hal/include/hal/ieee802154_common_ll.h +++ b/components/hal/include/hal/ieee802154_common_ll.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -470,8 +470,8 @@ static inline void ieee802154_ll_set_security_key(uint8_t *security_key) static inline void ieee802154_ll_disable_coex(void) { - IEEE802154.pti.pti = 1; - IEEE802154.pti.hw_ack_pti = 1; + IEEE802154.pti.pti = 3; + IEEE802154.pti.hw_ack_pti = 3; } static inline void ieee802154_ll_clear_debug_cnt(uint32_t clear_bits) diff --git a/components/ieee802154/driver/esp_ieee802154_dev.c b/components/ieee802154/driver/esp_ieee802154_dev.c index 4664a3591a..30d5ff93fd 100644 --- a/components/ieee802154/driver/esp_ieee802154_dev.c +++ b/components/ieee802154/driver/esp_ieee802154_dev.c @@ -1068,6 +1068,7 @@ esp_err_t ieee802154_energy_detect(uint32_t duration) stop_current_operation(); ieee802154_pib_update(); + IEEE802154_SET_TXRX_PTI(IEEE802154_SCENE_RX); start_ed(duration); ieee802154_set_state(IEEE802154_STATE_ED); @@ -1084,6 +1085,7 @@ esp_err_t ieee802154_cca(void) stop_current_operation(); ieee802154_pib_update(); + IEEE802154_SET_TXRX_PTI(IEEE802154_SCENE_RX); start_ed(CCA_DETECTION_TIME); ieee802154_set_state(IEEE802154_STATE_CCA);