diff --git a/components/esp_coex/include/esp_coex_i154.h b/components/esp_coex/include/esp_coex_i154.h index d601205ebe79..f817e901400a 100644 --- a/components/esp_coex/include/esp_coex_i154.h +++ b/components/esp_coex/include/esp_coex_i154.h @@ -6,6 +6,9 @@ #ifndef __COEXIST_I154_H__ #define __COEXIST_I154_H__ +/** + * @brief 802.15.4 coex event + */ typedef enum { IEEE802154_HIGH = 1, IEEE802154_MIDDLE, @@ -14,16 +17,50 @@ typedef enum { IEEE802154_EVENT_MAX, } ieee802154_coex_event_t; +/** + * @brief 802.15.4 coexistence configurations + */ typedef struct { ieee802154_coex_event_t idle; ieee802154_coex_event_t txrx; ieee802154_coex_event_t txrx_at; } esp_ieee802154_coex_config_t; +/** + * @brief Set 802.15.4 tx/rx pti + * @param 802.15.4 coexistence event + */ void esp_coex_ieee802154_txrx_pti_set(ieee802154_coex_event_t event); + +/** + * @brief Set 802.15.4 ack pti + * @param 802.15.4 coexistence event + */ void esp_coex_ieee802154_ack_pti_set(ieee802154_coex_event_t event); + +/** + * @brief Indicate that a coexistence break occurred in 802.15.4 + */ void esp_coex_ieee802154_coex_break_notify(void); + +/** + * @brief Enter the TX stage for 802.15.4 external coexistence handling + */ void esp_coex_ieee802154_extcoex_tx_stage(void); + +/** + * @brief Enter the RX stage for 802.15.4 external coexistence handling + */ void esp_coex_ieee802154_extcoex_rx_stage(void); +/** + * @brief Enable the 802.15.4 status for coexistence + */ +void esp_coex_ieee802154_status_enable(void); + +/** + * @brief Disable the 802.15.4 status for coexistence + */ +void esp_coex_ieee802154_status_disable(void); + #endif diff --git a/components/esp_coex/include/private/esp_coexist_internal.h b/components/esp_coex/include/private/esp_coexist_internal.h index 6e3799487f08..026f1f9fe0ab 100644 --- a/components/esp_coex/include/private/esp_coexist_internal.h +++ b/components/esp_coex/include/private/esp_coexist_internal.h @@ -32,6 +32,8 @@ typedef enum { COEX_SCHM_ST_TYPE_WIFI = 0, COEX_SCHM_ST_TYPE_BLE, COEX_SCHM_ST_TYPE_BT, + COEX_SCHM_ST_TYPE_EXTERNAL_COEX, + COEX_SCHM_ST_TYPE_I154, } coex_schm_st_type_t; #define COEX_STATUS_GET_WIFI_BITMAP (1 << COEX_SCHM_ST_TYPE_WIFI) diff --git a/components/esp_coex/lib b/components/esp_coex/lib index a449d6cd8f74..183ec97da1d4 160000 --- a/components/esp_coex/lib +++ b/components/esp_coex/lib @@ -1 +1 @@ -Subproject commit a449d6cd8f749421fbaffe71b2df2f75c73acbd6 +Subproject commit 183ec97da1d4ebd43b06c6580c3194d8b8e50f2d diff --git a/components/esp_coex/src/coexist.c b/components/esp_coex/src/coexist.c index a723fd5a73aa..22d482c7e849 100644 --- a/components/esp_coex/src/coexist.c +++ b/components/esp_coex/src/coexist.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2018-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -21,6 +21,10 @@ #include "esp_private/esp_modem_clock.h" #endif +#if CONFIG_ESP_COEX_SW_COEXIST_ENABLE && CONFIG_SOC_IEEE802154_SUPPORTED +#include "esp_coex_i154.h" +#endif + #if SOC_EXTERNAL_COEX_ADVANCE #define EXTERNAL_COEX_SIGNAL_I0_IDX EXTERN_ACTIVE_I_IDX #define EXTERNAL_COEX_SIGNAL_I1_IDX EXTERN_PRIORITY_I_IDX @@ -289,7 +293,7 @@ esp_err_t esp_coex_wifi_i154_enable(void) // TODO: Add a scheme for wifi and 154 coex. // Remove this function if FCC-50 closes. coex_enable(); - coex_schm_status_bit_set(1, 1); + esp_coex_ieee802154_status_enable(); return ESP_OK; } #endif diff --git a/components/esp_driver_rmt/src/rmt_common.c b/components/esp_driver_rmt/src/rmt_common.c index eb8a676821a5..3035329f14fe 100644 --- a/components/esp_driver_rmt/src/rmt_common.c +++ b/components/esp_driver_rmt/src/rmt_common.c @@ -211,15 +211,9 @@ esp_err_t rmt_select_periph_clock(rmt_channel_handle_t chan, rmt_clock_source_t // if the CPU frequency goes down, the transfer+encoding scheme could be unstable because CPU can't fill the data in time // so, choose ESP_PM_CPU_FREQ_MAX lock for non-dma mode // otherwise, chose lock type based on the clock source + // note, even if the clock source is APB, we still use CPU_FREQ_MAX lock to ensure the stability of the RMT operation. esp_pm_lock_type_t pm_lock_type = chan->dma_chan ? ESP_PM_NO_LIGHT_SLEEP : ESP_PM_CPU_FREQ_MAX; -#if SOC_RMT_SUPPORT_APB - if (clk_src == RMT_CLK_SRC_APB) { - // APB clock frequency can be changed during DFS - pm_lock_type = ESP_PM_APB_FREQ_MAX; - } -#endif // SOC_RMT_SUPPORT_APB - sprintf(chan->pm_lock_name, "rmt_%d_%d", group->group_id, chan->channel_id); // e.g. rmt_0_0 ret = esp_pm_lock_create(pm_lock_type, 0, chan->pm_lock_name, &chan->pm_lock); ESP_RETURN_ON_ERROR(ret, TAG, "create pm lock failed"); diff --git a/components/esp_system/eh_frame_parser.c b/components/esp_system/eh_frame_parser.c index db5350b27136..e64b03a91a3c 100644 --- a/components/esp_system/eh_frame_parser.c +++ b/components/esp_system/eh_frame_parser.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -150,7 +150,7 @@ typedef struct { /** * @brief Set a register's offset (relative to CFA). - * The highest bit is set to 1 to mark that this register needs to be retrived because it has been + * The highest bit is set to 1 to mark that this register needs to be retrieved because it has been * altered. */ #define ESP_EH_FRAME_SET_REG_OFFSET(offset) (0x80000000 | offset) @@ -201,7 +201,7 @@ typedef struct { #define ESP_EH_FRAME_GET_CFA_OFF(value) ((value) >> 8) /** - * @brief Unsupported opcode value to return when exeucting 0-opcode type instructions. + * @brief Unsupported opcode value to return when executing 0-opcode type instructions. */ #define ESP_EH_FRAME_UNSUPPORTED_OPCODE ((uint32_t) -1) @@ -253,8 +253,8 @@ typedef struct { * @brief Symbols defined by the linker. * Retrieve the addresses of both .eh_frame_hdr and .eh_frame sections. */ -extern void *__eh_frame_hdr; -extern void *__eh_frame; +extern uint8_t __eh_frame_hdr[]; +extern uint8_t __eh_frame[]; /** * @brief Decode multiple bytes encoded in LEB128. @@ -727,7 +727,7 @@ static uint32_t esp_eh_frame_initialize_state(const uint8_t* cie, ExecutionFrame * @param state DWARF VM registers. * * @return Return Address of the current context. Frame has been restored to the previous context - * (before calling the function program counter is currently going throught). + * (before calling the function program counter is currently going through). */ static uint32_t esp_eh_frame_restore_caller_state(const uint32_t* fde, ExecutionFrame* frame, @@ -768,7 +768,7 @@ static uint32_t esp_eh_frame_restore_caller_state(const uint32_t* fde, */ bool success = esp_eh_frame_execute(instructions, instructions_length, frame, state); if (!success) { - /* An error occured (unsupported opcode), return PC as the return address. + /* An error occurred (unsupported opcode), return PC as the return address. * This will be tested by the caller, and the backtrace will be finished. */ return EXECUTION_FRAME_PC(*frame); } @@ -799,7 +799,7 @@ static uint32_t esp_eh_frame_restore_caller_state(const uint32_t* fde, /* If the frame was not available, it would be possible to retrieve the return address * register thanks to CIE structure. * The return address points to the address the PC needs to jump to. It - * does NOT point to the instruction where the routine call occured. + * does NOT point to the instruction where the routine call occurred. * This can cause problems with functions without epilogue (i.e. function * which last instruction is a function call). This happens when compiler * optimization are ON or when a function is marked as "noreturn". @@ -840,7 +840,7 @@ static bool esp_eh_frame_missing_info(const uint32_t* fde, uint32_t pc) /** * @brief When one step of the backtrace is generated, output it to the serial. - * This function can be overriden as it is defined as weak. + * This function can be overridden as it is defined as weak. * * @param pc Program counter of the backtrace step. * @param sp Stack pointer of the backtrace step. diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 2f137de7330a..49a16dc8a448 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 2f137de7330a8165bff68bdc866e866806fbc7a9 +Subproject commit 49a16dc8a448eb78d1219233129106d2d7e95b30 diff --git a/tools/ci/dynamic_pipelines/scripts/generate_target_test_child_pipeline.py b/tools/ci/dynamic_pipelines/scripts/generate_target_test_child_pipeline.py index 55b4cd2beb04..5a51fa97a5a7 100644 --- a/tools/ci/dynamic_pipelines/scripts/generate_target_test_child_pipeline.py +++ b/tools/ci/dynamic_pipelines/scripts/generate_target_test_child_pipeline.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 """This file is used for generating the child pipeline for target test jobs. @@ -47,7 +47,7 @@ def get_tags_with_amount(s: str) -> t.List[str]: def get_target_test_jobs( - paths: str, apps: t.List[App], exclude_runner_tags: t.Set[str] + paths: str, apps: t.List[App], exclude_runner_tags: t.Set[str], exclude_runner_tags_matching: t.List[t.Set] ) -> t.Tuple[t.List[Job], t.List[str], t.List[str]]: """ Return the target test jobs and the extra yaml files to include @@ -81,6 +81,10 @@ def get_target_test_jobs( print('WARNING: excluding test cases with runner tags:', runner_tags) continue + if any(set(runner_tags) & group for group in exclude_runner_tags_matching): + print(f'WARNING: Excluding test cases with runner tags (wildcard match): {runner_tags}') + continue + target_test_job = TargetTestJob( name=f'{target_selector} - {",".join(env_markers)}', tags=runner_tags, @@ -115,16 +119,38 @@ def generate_target_test_child_pipeline( with open(KNOWN_GENERATE_TEST_CHILD_PIPELINE_WARNINGS_FILEPATH) as fr: known_warnings_dict = yaml.safe_load(fr) or dict() - exclude_runner_tags_set = set(known_warnings_dict.get('no_runner_tags', [])) + def _process_match_group(runner_tags: str) -> t.Union[t.Set, None]: + match_group = {_el for _el in runner_tags.split(',') if _el != '*'} + if len(match_group) == 0: + print('WARNING: wildcard exclusion requires at least one specific tag — skipped') + return None + return match_group + + exclude_runner_tags_set = set() + exclude_runner_tags_matching = [] + for _tag in known_warnings_dict.get('no_runner_tags', []): + if '*' not in _tag: + exclude_runner_tags_set.add(_tag) + else: + if res := _process_match_group(_tag): + exclude_runner_tags_matching.append(res) + # EXCLUDE_RUNNER_TAGS is a string separated by ';' # like 'esp32,generic;esp32c3,wifi' + # or with wildcard like 'esp32,*; esp32p4,wifi,*' if exclude_runner_tags := os.getenv('EXCLUDE_RUNNER_TAGS'): - exclude_runner_tags_set.update(exclude_runner_tags.split(';')) + for _tag in exclude_runner_tags.split(';'): + if '*' not in _tag: + exclude_runner_tags_set.add(_tag) + else: + if res := _process_match_group(_tag): + exclude_runner_tags_matching.append(res) target_test_jobs, extra_include_yml, no_env_marker_test_cases = get_target_test_jobs( paths=paths, apps=apps, exclude_runner_tags=exclude_runner_tags_set, + exclude_runner_tags_matching=exclude_runner_tags_matching, ) known_no_env_marker_test_cases = set(known_warnings_dict.get('no_env_marker_test_cases', [])) diff --git a/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml b/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml index 90014e07aefd..eded998a82e4 100644 --- a/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml +++ b/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml @@ -16,5 +16,7 @@ no_runner_tags: - esp32c3,sdcard_sdmode - esp32c6,jtag - esp32h2,jtag + - esp32p4,* - esp32p4,jtag + - esp32p4_2,* - esp32s2,usb_host_flash_disk