From 1aec9e7df38bb7ccc9ec2fb846288910c329d77a Mon Sep 17 00:00:00 2001 From: Alexey Gerenkov Date: Thu, 11 Apr 2024 15:34:51 +0300 Subject: [PATCH] fix(esp_pm): Fix APB clock calculation for chips w/o modem --- components/esp_pm/pm_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_pm/pm_impl.c b/components/esp_pm/pm_impl.c index 37d76df5d1..e3f622b212 100644 --- a/components/esp_pm/pm_impl.c +++ b/components/esp_pm/pm_impl.c @@ -438,7 +438,7 @@ esp_err_t esp_pm_configure(const void* vconfig) /* Maximum SOC APB clock frequency is 40 MHz, maximum Modem (WiFi, * Bluetooth, etc..) APB clock frequency is 80 MHz */ int apb_clk_freq = esp_clk_apb_freq() / MHZ; -#if CONFIG_ESP_WIFI_ENABLED || CONFIG_BT_ENABLED || CONFIG_IEEE802154_ENABLED +#if (CONFIG_ESP_WIFI_ENABLED || CONFIG_BT_ENABLED || CONFIG_IEEE802154_ENABLED) && SOC_PHY_SUPPORTED apb_clk_freq = MAX(apb_clk_freq, MODEM_REQUIRED_MIN_APB_CLK_FREQ / MHZ); #endif int apb_max_freq = MIN(max_freq_mhz, apb_clk_freq); /* CPU frequency in APB_MAX mode */