mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 10:40:47 +03:00
fix(esp_phy): Add protection of consecutive disable operations by single modem source
This commit is contained in:
@@ -357,8 +357,9 @@ void esp_phy_disable(esp_phy_modem_t modem)
|
||||
#if CONFIG_ESP_PHY_RECORD_USED_TIME
|
||||
phy_record_time(false, modem);
|
||||
#endif
|
||||
esp_phy_modem_t saved_modem = phy_get_modem_flag();
|
||||
phy_clr_modem_flag(modem);
|
||||
if (phy_get_modem_flag() == 0) {
|
||||
if (saved_modem == modem) {
|
||||
// ESP32 will track pll in the wifi/BT modem interrupt handler.
|
||||
#if !CONFIG_IDF_TARGET_ESP32 && !CONFIG_ESP_PHY_DISABLE_PLL_TRACK
|
||||
phy_track_pll_deinit();
|
||||
|
||||
Reference in New Issue
Block a user