fix(esp_hw_support): fix modem power enable failed after modem state wakeup

This commit is contained in:
wuzhenghui
2024-12-23 14:49:29 +08:00
parent 706a445782
commit 0c0d8cb8e4
6 changed files with 35 additions and 10 deletions
+12
View File
@@ -6,6 +6,7 @@
#include <stdint.h>
#include <string.h>
#include "sdkconfig.h"
#include "esp_timer.h"
#include "esp_log.h"
#include "esp_private/esp_gpio_reserve.h"
@@ -17,6 +18,10 @@
#include "esp_phy.h"
#include "esp_attr.h"
#if SOC_PM_SUPPORT_PMU_MODEM_STATE && CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
#include "hal/temperature_sensor_ll.h"
#endif
static const char* TAG = "phy_comm";
static volatile uint16_t s_phy_modem_flag = 0;
@@ -347,4 +352,11 @@ uint32_t phy_ana_i2c_master_burst_rf_onoff(bool on)
return phy_ana_i2c_master_burst_config(cmd, size, on ? PHY_I2C_MST_CMD_TYPE_RF_ON : PHY_I2C_MST_CMD_TYPE_RF_OFF);
}
#if CONFIG_ESP_WIFI_ENHANCED_LIGHT_SLEEP
void phy_wakeup_from_modem_state_extra_init(void)
{
temperature_sensor_ll_enable(true);
}
#endif
#endif
+6 -4
View File
@@ -312,6 +312,8 @@ void esp_phy_enable(esp_phy_modem_t modem)
} else {
phy_wakeup_init();
}
} else {
phy_wakeup_from_modem_state_extra_init();
}
#else
phy_wakeup_init();
@@ -335,10 +337,10 @@ void esp_phy_enable(esp_phy_modem_t modem)
phy_track_pll_init();
#endif
if (phy_ant_need_update()) {
phy_ant_update();
phy_ant_clr_update_flag();
}
if (phy_ant_need_update()) {
phy_ant_update();
phy_ant_clr_update_flag();
}
}
phy_set_modem_flag(modem);