mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
Merge branch 'fix/check_phy_state_in_dslp_rf_closing' into 'master'
change(esp_phy): check phy_state in dslp process before closing rf See merge request espressif/esp-idf!52870
This commit is contained in:
@@ -882,6 +882,18 @@ static void __attribute((unused)) esp_phy_reduce_tx_power(esp_phy_init_data_t* i
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_ESP_PHY_ENABLED && SOC_DEEP_SLEEP_SUPPORTED
|
||||||
|
static void phy_deep_sleep_prepare(void)
|
||||||
|
{
|
||||||
|
if (phy_get_modem_flag() != 0) {
|
||||||
|
phy_close_rf();
|
||||||
|
#if !CONFIG_IDF_TARGET_ESP32
|
||||||
|
phy_xpd_tsens();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void esp_phy_load_cal_and_init(void)
|
void esp_phy_load_cal_and_init(void)
|
||||||
{
|
{
|
||||||
char * phy_version = get_phy_version_str();
|
char * phy_version = get_phy_version_str();
|
||||||
@@ -973,12 +985,7 @@ void esp_phy_load_cal_and_init(void)
|
|||||||
esp_phy_release_init_data(init_data);
|
esp_phy_release_init_data(init_data);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_ESP_PHY_ENABLED && SOC_DEEP_SLEEP_SUPPORTED
|
#if CONFIG_ESP_PHY_ENABLED && SOC_DEEP_SLEEP_SUPPORTED
|
||||||
ESP_ERROR_CHECK(esp_deep_sleep_register_phy_hook(&phy_close_rf));
|
ESP_ERROR_CHECK(esp_deep_sleep_register_phy_hook(&phy_deep_sleep_prepare));
|
||||||
#endif
|
|
||||||
#if !CONFIG_IDF_TARGET_ESP32
|
|
||||||
#if CONFIG_ESP_PHY_ENABLED && SOC_DEEP_SLEEP_SUPPORTED
|
|
||||||
ESP_ERROR_CHECK(esp_deep_sleep_register_phy_hook(&phy_xpd_tsens));
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
free(cal_data); // PHY maintains a copy of calibration data, so we can free this
|
free(cal_data); // PHY maintains a copy of calibration data, so we can free this
|
||||||
|
|||||||
Reference in New Issue
Block a user