Skip to content

Commit db50b1a

Browse files
committed
Merge branch 'bugfix/support_cert_test' into 'master'
All chip support cert_test Closes WIFI-5432, IDFGH-12197, and IDFHG-10756 See merge request espressif/esp-idf!27977
2 parents efdc853 + dacc1f9 commit db50b1a

File tree

9 files changed

+32
-16
lines changed

9 files changed

+32
-16
lines changed

components/esp_phy/CMakeLists.txt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,19 @@ if(CONFIG_ESP_PHY_ENABLED)
7373

7474
idf_component_get_property(esp_phy_lib esp_phy COMPONENT_LIB)
7575

76+
if(CONFIG_ESP_PHY_ENABLE_CERT_TEST)
77+
if(CONFIG_IDF_TARGET_ESP32)
78+
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${esp_phy_lib}> libbttestmode.a
79+
librftest.a $<TARGET_FILE:${esp_phy_lib}>)
80+
elseif(CONFIG_IDF_TARGET_ESP32S2)
81+
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${esp_phy_lib}> librftest.a
82+
librfate.a $<TARGET_FILE:${esp_phy_lib}>)
83+
else()
84+
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${esp_phy_lib}> libbttestmode.a
85+
librfate.a librftest.a $<TARGET_FILE:${esp_phy_lib}>)
86+
endif()
87+
endif()
88+
7689
if(CONFIG_IDF_TARGET_ESP32)
7790
target_link_libraries(${COMPONENT_LIB} PUBLIC rtc)
7891
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${esp_phy_lib}> libphy.a librtc.a
@@ -85,12 +98,7 @@ if(CONFIG_ESP_PHY_ENABLED)
8598
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${esp_phy_lib}> libphy.a
8699
$<TARGET_FILE:${esp_phy_lib}>)
87100
endif()
88-
89-
if(CONFIG_ESP_PHY_ENABLE_CERT_TEST)
90-
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${esp_phy_lib}> libbttestmode.a
91-
librfate.a librftest.a $<TARGET_FILE:${esp_phy_lib}>)
92101
endif()
93-
endif()
94102

95103
if(CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION)
96104
idf_component_get_property(esp_common_dir esp_common COMPONENT_DIR)

components/esp_phy/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ menu "PHY"
130130
config ESP_PHY_ENABLE_CERT_TEST
131131
bool "Enable RF certification test functions"
132132
default n
133-
depends on IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
134133
help
135134
If enabled, you can use RF certification test APIs.
136135

components/esp_phy/include/esp_phy_cert_test.h

Lines changed: 3 additions & 3 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-2024 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -63,7 +63,7 @@ typedef struct {
6363
uint32_t phy_rx_correct_count; /*!< The number of desired packets received */
6464
int phy_rx_rssi; /*!< Average RSSI of desired packets */
6565
uint32_t phy_rx_total_count; /*!< The number of total packets received */
66-
uint32_t phy_rx_result_flag; /*!< 0 means no RX info; 1 means the lastest Wi-Fi RX info; 2 means the lastest BLE RX info. */
66+
uint32_t phy_rx_result_flag; /*!< 0 means no RX info; 1 means the latest Wi-Fi RX info; 2 means the latest BLE RX info. */
6767
} esp_phy_rx_result_t;
6868

6969
/**
@@ -120,7 +120,7 @@ void esp_phy_cbw40m_en(bool en);
120120
void esp_phy_wifi_tx(uint32_t chan, esp_phy_wifi_rate_t rate, int8_t backoff, uint32_t length_byte, uint32_t packet_delay, uint32_t packet_num);
121121

122122
/**
123-
* @brief Test start/stop command, used to stop transmitting or reciving state.
123+
* @brief Test start/stop command, used to stop transmitting or receiving state.
124124
*
125125
* @param value:
126126
* Value should be set to 3 before TX/RX.

examples/phy/.build-test-rules.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ examples/phy/antenna:
88
- if: IDF_TARGET in ["esp32p4", "esp32h2"]
99
reason: not supported
1010
examples/phy/cert_test:
11-
enable:
12-
- if: IDF_TARGET in ["esp32c3", "esp32s3"]
11+
disable:
12+
- if: IDF_TARGET in ["esp32p4"]
13+
reason: not supported
14+
- if: IDF_TARGET in ["esp32c5", "esp32c61"]
1315
temporary: true
14-
reason: the other targets are not tested yet
16+
reason: not supported yet # TODO: [ESP32C5] IDF-8851

examples/phy/cert_test/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| Supported Targets | ESP32-C3 | ESP32-S3 |
2-
| ----------------- | -------- | -------- |
1+
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 |
2+
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
33

44
# Certification Test Example
55

@@ -121,4 +121,4 @@ For BLE test, if you want to use `fcc_le_tx` and `rw_le_rx_per` legacy commands
121121

122122
## Troubleshooting
123123

124-
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
124+
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.

examples/phy/cert_test/main/cert_test.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ void app_main(void)
3838
register_phy_cmd();
3939

4040
/* rftest.a requirements */
41+
#ifndef CONFIG_IDF_TARGET_ESP32H2
4142
esp_wifi_power_domain_on();
43+
#endif
4244

4345
esp_phy_rftest_config(1);
4446
esp_phy_rftest_init();

examples/phy/cert_test/sdkconfig.defaults

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ CONFIG_ESP_TASK_WDT_EN=n
22

33
CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION=y
44
CONFIG_ESP_PHY_ENABLE_CERT_TEST=y
5+
CONFIG_BT_ENABLED=y
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#
2+
# ESP32S3-specific
3+
#
4+
CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096

0 commit comments

Comments
 (0)