esp-idf/components/soc/esp32
Ivan Grokhotkov 2e31cce390 soc/rtc: CPU frequency settings refactoring
Previous APIs used to set CPU frequency used CPU frequencies listed in
rtc_cpu_freq_t enumeration. This was problematic for two reasons.
First, supporting many possible frequency values obtained by dividing
XTAL frequency was hard, as every value would have to be listed in
the enumeration. Since different base XTAL frequencies are supported,
this further complicated things, since not all of these divided
frequencies would be valid for any given XTAL frequency. Second,
having to deal with enumeration values often involved switch
statements to convert between enumeration and MHz values, handle
PLL/XTAL frequencies separately, etc.

This change introduces rtc_cpu_freq_config_t structure, which contains
CPU frequency (in MHz) and information on how this frequency has to
be generated: clock source (XTAL/PLL), source frequency, clock
divider value. More fields can be added to this structure in the
future. This structure simplifies many parts of the code, since both
frequency value and frequency generation settings can be accessed in
any place in code without the need for conversions.

Additionally, this change adds setting of REF_TICK dividers to support
frequencies lower then XTAL with DFS.
2018-08-21 13:02:03 +08:00
..
include/soc soc/rtc: CPU frequency settings refactoring 2018-08-21 13:02:03 +08:00
test ci: Only run XTAL unit tests assuming board has an XTAL, run less repeats 2018-05-15 15:43:24 +08:00
cpu_util.c esp_restart: fix possible race while stalling other CPU, enable WDT early 2017-10-26 19:53:53 +08:00
gpio_periph.c soc: Fix check_long_hold_gpio and move def to soc 2018-06-22 09:20:27 +05:00
i2c_apll.h soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08:00
i2c_bbpll.h soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08:00
i2c_rtc_clk.h soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08:00
rtc_clk.c soc/rtc: CPU frequency settings refactoring 2018-08-21 13:02:03 +08:00
rtc_init.c soc: rtc_vddsdio_get_config() In default configuration, VDD_SDIO LDO is always enabled 2018-05-25 15:14:13 +10:00
rtc_periph.c Fix errors in rtc_gpio_desc values 2018-07-12 23:16:15 -07:00
rtc_pm.c soc/rtc: don’t switch frequency in rtc_sleep_init 2018-04-26 18:52:45 +08:00
rtc_sleep.c sleep: optimize light sleep wakeup latency 2018-04-26 19:36:47 +08:00
rtc_time.c soc/clk: Fix range CONFIG_ESP32_RTC_CLK_CAL_CYCLES 2018-07-10 11:56:12 +05:00
rtc_wdt.c soc/rtc_wdt: Add API functions for rtc_wdt 2018-08-14 17:48:02 +05:00
sdio_slave_periph.c Replace all DOS line endings with Unix 2018-07-12 19:10:37 +08:00
sdmmc_periph.c Replace all DOS line endings with Unix 2018-07-12 19:10:37 +08:00
soc_log.h soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08:00
soc_memory_layout.c soc: Allow components to reserve fixed memory ranges that they need 2018-08-06 01:37:55 +00:00
spi_periph.c Replace all DOS line endings with Unix 2018-07-12 19:10:37 +08:00