From 927b402153d3080839002e182d0fd8a747ea2c73 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 21 Jul 2022 22:44:16 +0800 Subject: [PATCH] unit_test: power on wifi or bt domain before phy enable --- components/esp_wifi/test/test_phy_rtc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/esp_wifi/test/test_phy_rtc.c b/components/esp_wifi/test/test_phy_rtc.c index b8979245c4..458d621e9e 100644 --- a/components/esp_wifi/test/test_phy_rtc.c +++ b/components/esp_wifi/test/test_phy_rtc.c @@ -12,6 +12,7 @@ #include #include #include "soc/soc_caps.h" +#include "esp_private/wifi.h" #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2, ESP32C3) @@ -52,6 +53,9 @@ static void test_phy_rtc_init(void) static IRAM_ATTR void test_phy_rtc_cache_task(void *arg) { + //power up wifi and bt mac bb power domain + esp_wifi_power_domain_on(); + test_phy_rtc_init(); #if CONFIG_IDF_TARGET_ESP32 @@ -102,6 +106,10 @@ static IRAM_ATTR void test_phy_rtc_cache_task(void *arg) #endif //SOC_BT_SUPPORTED + + //power down wifi and bt mac bb power domain + esp_wifi_power_domain_off(); + TEST_ASSERT( xSemaphoreGive(semphr_done) ); vTaskDelete(NULL);