Merge branch 'feature/support_sleep_for_esp32c2' into 'master'

esp32c2: support power management

Closes IDF-4440 and IDF-4617

See merge request espressif/esp-idf!18174
This commit is contained in:
Jiang Jiang Jian
2022-05-30 17:57:18 +08:00
19 changed files with 117 additions and 24 deletions

View File

@@ -147,6 +147,8 @@ static void select_rtc_slow_clk(slow_clk_sel_t slow_clk)
* will time out, returning 0.
*/
ESP_EARLY_LOGD(TAG, "waiting for external clock by pin0 to start up");
rtc_clk_32k_enable_external();
// When SLOW_CLK_CAL_CYCLES is set to 0, clock calibration will not be performed at startup.
if (SLOW_CLK_CAL_CYCLES > 0) {
cal_val = rtc_clk_cal(RTC_CAL_EXT_CLK, SLOW_CLK_CAL_CYCLES);