forked from espressif/esp-idf
esp_phy: fix failure of unit test for test_phy_rtc_init on ESP32-C6
- esp_phy_enable() blocks in the unit test due to the FE related functions in modem clock registers are not enabled. This MR adds dependency of FE for PHY module.
This commit is contained in:
@@ -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 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 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)
|
||||
{
|
||||
|
@@ -11,9 +11,10 @@
|
||||
#include <freertos/task.h>
|
||||
#include <freertos/semphr.h>
|
||||
#include "soc/soc_caps.h"
|
||||
#include "esp_private/esp_modem_clock.h"
|
||||
#include "esp_private/wifi.h"
|
||||
|
||||
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6, ESP32H2)
|
||||
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32H2)
|
||||
//IDF-5046
|
||||
|
||||
#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
|
||||
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();
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
@@ -97,6 +100,9 @@ static IRAM_ATTR void test_phy_rtc_cache_task(void *arg)
|
||||
|
||||
#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
|
||||
esp_wifi_power_domain_off();
|
||||
|
||||
|
Reference in New Issue
Block a user