change(esp_hw_support): switch lp_cpu power mode with clock src to save lp_cpu working power
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#if SOC_MODEM_CLOCK_SUPPORTED
|
||||
#include "hal/modem_lpcon_ll.h"
|
||||
#endif
|
||||
#include "esp_private/esp_sleep_internal.h"
|
||||
#include "esp_private/esp_modem_clock.h"
|
||||
#include "esp_private/periph_ctrl.h"
|
||||
#include "esp_private/esp_clk.h"
|
||||
@@ -60,6 +61,7 @@ __attribute__((weak)) void esp_clk_init(void)
|
||||
rtc_clk_fast_src_set(SOC_RTC_FAST_CLK_SRC_RC_FAST);
|
||||
#elif CONFIG_RTC_FAST_CLK_SRC_XTAL
|
||||
rtc_clk_fast_src_set(SOC_RTC_FAST_CLK_SRC_XTAL);
|
||||
esp_sleep_sub_mode_config(ESP_SLEEP_RTC_FAST_USE_XTAL_MODE, true);
|
||||
#else
|
||||
#error "No RTC fast clock source configured"
|
||||
#endif
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "hal/wdt_hal.h"
|
||||
|
||||
#include "esp_private/esp_modem_clock.h"
|
||||
#include "esp_private/esp_sleep_internal.h"
|
||||
#include "esp_private/periph_ctrl.h"
|
||||
#include "esp_private/esp_clk.h"
|
||||
#include "esp_private/esp_pmu.h"
|
||||
@@ -90,6 +91,7 @@ __attribute__((weak)) void esp_clk_init(void)
|
||||
rtc_clk_fast_src_set(SOC_RTC_FAST_CLK_SRC_RC_FAST);
|
||||
#elif CONFIG_RTC_FAST_CLK_SRC_XTAL
|
||||
rtc_clk_fast_src_set(SOC_RTC_FAST_CLK_SRC_XTAL);
|
||||
esp_sleep_sub_mode_config(ESP_SLEEP_RTC_FAST_USE_XTAL_MODE, true);
|
||||
#else
|
||||
#error "No RTC fast clock source configured"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user