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:
XiaXiaotian
2017-08-08 16:58:58 +08:00
parent 4da7ee1295
commit 4776f73ca4
4 changed files with 99 additions and 0 deletions

View File

@@ -54,3 +54,11 @@ uint32_t esp_clk_slowclk_cal_get();
*/
void esp_clk_slowclk_cal_set(uint32_t value);
/**
* @brief Disables clock of some peripherals
*
* Called from cpu_start.c, not intended to be called from other places.
* This function disables clock of useless peripherals when cpu starts.
*/
void esp_perip_clk_init(void);