mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
Disable some peripheral clocks when cpu starts
All peripheral clocks are default enabled after chip is powered on. When CPU starts, if reset reason is CPU reset, disable those clocks that are not enabled before reset. Otherwise, disable all those useless clocks. These peripheral clocks must be enabled when the peripherals are initialized and disabled when they are deinitialized.
This commit is contained in:
@@ -238,6 +238,7 @@ void start_cpu0_default(void)
|
||||
trax_start_trace(TRAX_DOWNCOUNT_WORDS);
|
||||
#endif
|
||||
esp_clk_init();
|
||||
esp_perip_clk_init();
|
||||
intr_matrix_clear();
|
||||
#ifndef CONFIG_CONSOLE_UART_NONE
|
||||
uart_div_modify(CONFIG_CONSOLE_UART_NUM, (rtc_clk_apb_freq_get() << 4) / CONFIG_CONSOLE_UART_BAUDRATE);
|
||||
|
Reference in New Issue
Block a user