Skip to content

Commit 350e3c3

Browse files
esp-lisespressif-bot
authored andcommitted
fix(esp_system): update clk code for esp32h21
1 parent d89b9cb commit 350e3c3

File tree

1 file changed

+2
-3
lines changed
  • components/esp_system/port/soc/esp32h21

1 file changed

+2
-3
lines changed

components/esp_system/port/soc/esp32h21/clk.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "soc/lp_clkrst_reg.h"
2525
#include "soc/pcr_reg.h"
2626
#include "hal/wdt_hal.h"
27+
#include "esp_private/esp_modem_clock.h"
2728
#include "esp_private/periph_ctrl.h"
2829
#include "esp_private/esp_clk.h"
2930
#include "esp_private/esp_pmu.h"
@@ -79,6 +80,7 @@ __attribute__((weak)) void esp_clk_init(void)
7980
wdt_hal_write_protect_enable(&rtc_wdt_ctx);
8081
#endif
8182

83+
modem_clock_deselect_all_module_lp_clock_source();
8284
#if defined(CONFIG_RTC_CLK_SRC_EXT_CRYS)
8385
select_rtc_slow_clk(SOC_RTC_SLOW_CLK_SRC_XTAL32K);
8486
#elif defined(CONFIG_RTC_CLK_SRC_EXT_OSC)
@@ -118,9 +120,6 @@ __attribute__((weak)) void esp_clk_init(void)
118120

119121
// Re calculate the ccount to make time calculation correct.
120122
esp_cpu_set_cycle_count((uint64_t)esp_cpu_get_cycle_count() * new_freq_mhz / old_freq_mhz);
121-
122-
// Set crypto clock (`clk_sec`) to use 96M PLL clock
123-
REG_SET_FIELD(PCR_SEC_CONF_REG, PCR_SEC_CLK_SEL, 0x3);
124123
}
125124

126125
static void select_rtc_slow_clk(soc_rtc_slow_clk_src_t rtc_slow_clk_src)

0 commit comments

Comments
 (0)