mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
workaround: bypass clock power_domain maintaining since esp32h2 sleep is not supported
This commit is contained in:
parent
ade6d3e5bc
commit
042aa93fa2
@ -288,6 +288,7 @@ void modem_clock_select_lp_clock_source(periph_module_t module, modem_clock_lpcl
|
||||
MODEM_CLOCK_instance()->lpclk_src[module - PERIPH_MODEM_MODULE_MIN] = src;
|
||||
portEXIT_CRITICAL_SAFE(&MODEM_CLOCK_instance()->lock);
|
||||
|
||||
#if !CONFIG_IDF_TARGET_ESP32H2 // TODO: IDF-6267
|
||||
/* The power domain of the low-power clock source required by the modem
|
||||
* module remains powered on during sleep */
|
||||
esp_sleep_pd_domain_t pd_domain = (esp_sleep_pd_domain_t) ( \
|
||||
@ -304,6 +305,9 @@ void modem_clock_select_lp_clock_source(periph_module_t module, modem_clock_lpcl
|
||||
: ESP_PD_DOMAIN_MAX);
|
||||
esp_sleep_pd_config(pd_domain, ESP_PD_OPTION_OFF);
|
||||
esp_sleep_pd_config(pu_domain, ESP_PD_OPTION_ON);
|
||||
#else
|
||||
(void)last_src; // Only for bypass compile warning, delete if IDF-6267 resloved
|
||||
#endif //!CONFIG_IDF_TARGET_ESP32H2
|
||||
}
|
||||
|
||||
void modem_clock_deselect_lp_clock_source(periph_module_t module)
|
||||
@ -336,6 +340,7 @@ void modem_clock_deselect_lp_clock_source(periph_module_t module)
|
||||
MODEM_CLOCK_instance()->lpclk_src[module - PERIPH_MODEM_MODULE_MIN] = MODEM_CLOCK_LPCLK_SRC_INVALID;
|
||||
portEXIT_CRITICAL_SAFE(&MODEM_CLOCK_instance()->lock);
|
||||
|
||||
#if !CONFIG_IDF_TARGET_ESP32H2 // TODO: IDF-6267
|
||||
esp_sleep_pd_domain_t pd_domain = (esp_sleep_pd_domain_t) ( \
|
||||
(last_src == MODEM_CLOCK_LPCLK_SRC_RC_FAST) ? ESP_PD_DOMAIN_RC_FAST \
|
||||
: (last_src == MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL) ? ESP_PD_DOMAIN_XTAL \
|
||||
@ -343,4 +348,7 @@ void modem_clock_deselect_lp_clock_source(periph_module_t module)
|
||||
: (last_src == MODEM_CLOCK_LPCLK_SRC_XTAL32K) ? ESP_PD_DOMAIN_XTAL32K \
|
||||
: ESP_PD_DOMAIN_MAX);
|
||||
esp_sleep_pd_config(pd_domain, ESP_PD_OPTION_OFF);
|
||||
#else
|
||||
(void)last_src; // Only for bypass compile warning, delete if IDF-6267 resloved
|
||||
#endif //!CONFIG_IDF_TARGET_ESP32H2
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user