mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
clk_tree: prework of introducing clk subsystem control
1. Clean up clk usage in IDF, replace rtc_clk_xtal/apb_freq_get with upper level API esp_clk_xtal/apb_freq 2. Fix small errors and wrong comments related to clock 3. Add clk_tree_defs.h to provide an unified clock id for each chip Modify the NGed drivers to adopt new clock ids
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include "esp_compiler.h"
|
||||
#include "soc/periph_defs.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "soc/rtc.h"
|
||||
#include "esp_private/esp_clk.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "hal/systimer_ll.h"
|
||||
#include "hal/systimer_types.h"
|
||||
@@ -113,7 +113,8 @@ esp_err_t esp_timer_impl_early_init(void)
|
||||
systimer_hal_init(&systimer_hal);
|
||||
|
||||
#if !SOC_SYSTIMER_FIXED_TICKS_US
|
||||
assert(rtc_clk_xtal_freq_get() == 40 && "update the step for xtal to support other XTAL:APB frequency ratios");
|
||||
assert(esp_clk_xtal_freq() == (40 * 1000000) &&
|
||||
"update the step for xtal to support other XTAL:APB frequency ratios");
|
||||
systimer_hal_set_steps_per_tick(&systimer_hal, 0, 2); // for xtal
|
||||
systimer_hal_set_steps_per_tick(&systimer_hal, 1, 1); // for pll
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user