Merge branch 'bugfix/fix_unit_test_for_esp_phy' into 'master'

esp_phy: fix failure of unit test for test_phy_rtc_init on ESP32-C6

Closes WIFI-5112

See merge request espressif/esp-idf!22787
This commit is contained in:
Jiang Jiang Jian
2023-03-17 17:56:21 +08:00
2 changed files with 9 additions and 3 deletions

View File

@@ -202,7 +202,7 @@ static void IRAM_ATTR modem_clock_device_disable(modem_clock_context_t *ctx, uin
#define BLE_CLOCK_DEPS (MODEM_CLOCK_BLE_MAC | MODEM_CLOCK_FE | MODEM_CLOCK_BLE_BB | MODEM_CLOCK_ETM | MODEM_CLOCK_COEXIST) #define BLE_CLOCK_DEPS (MODEM_CLOCK_BLE_MAC | MODEM_CLOCK_FE | MODEM_CLOCK_BLE_BB | MODEM_CLOCK_ETM | MODEM_CLOCK_COEXIST)
#define IEEE802154_CLOCK_DEPS (MODEM_CLOCK_802154_MAC | MODEM_CLOCK_FE | MODEM_CLOCK_BLE_BB | MODEM_CLOCK_ETM | MODEM_CLOCK_COEXIST) #define IEEE802154_CLOCK_DEPS (MODEM_CLOCK_802154_MAC | MODEM_CLOCK_FE | MODEM_CLOCK_BLE_BB | MODEM_CLOCK_ETM | MODEM_CLOCK_COEXIST)
#define COEXIST_CLOCK_DEPS (MODEM_CLOCK_COEXIST) #define COEXIST_CLOCK_DEPS (MODEM_CLOCK_COEXIST)
#define PHY_CLOCK_DEPS (MODEM_CLOCK_I2C_MASTER) #define PHY_CLOCK_DEPS (MODEM_CLOCK_I2C_MASTER | MODEM_CLOCK_FE)
void IRAM_ATTR modem_clock_module_enable(periph_module_t module) void IRAM_ATTR modem_clock_module_enable(periph_module_t module)
{ {

View File

@@ -11,9 +11,10 @@
#include <freertos/task.h> #include <freertos/task.h>
#include <freertos/semphr.h> #include <freertos/semphr.h>
#include "soc/soc_caps.h" #include "soc/soc_caps.h"
#include "esp_private/esp_modem_clock.h"
#include "esp_private/wifi.h" #include "esp_private/wifi.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6, ESP32H2) #if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32H2)
//IDF-5046 //IDF-5046
#include "esp_phy_init.h" #include "esp_phy_init.h"
@@ -57,7 +58,9 @@ static IRAM_ATTR void test_phy_rtc_cache_task(void *arg)
{ {
//power up wifi and bt mac bb power domain //power up wifi and bt mac bb power domain
esp_wifi_power_domain_on(); esp_wifi_power_domain_on();
#if CONFIG_IDF_TARGET_ESP32C6
modem_clock_module_enable(PERIPH_PHY_MODULE);
#endif // CONFIG_IDF_TARGET_ESP32C6
test_phy_rtc_init(); test_phy_rtc_init();
#if CONFIG_IDF_TARGET_ESP32 #if CONFIG_IDF_TARGET_ESP32
@@ -97,6 +100,9 @@ static IRAM_ATTR void test_phy_rtc_cache_task(void *arg)
#endif //SOC_BT_SUPPORTED #endif //SOC_BT_SUPPORTED
#if CONFIG_IDF_TARGET_ESP32C6
modem_clock_module_disable(PERIPH_PHY_MODULE);
#endif // CONFIG_IDF_TARGET_ESP32C6
//power down wifi and bt mac bb power domain //power down wifi and bt mac bb power domain
esp_wifi_power_domain_off(); esp_wifi_power_domain_off();