esp-idf/components/soc/esp32/include/soc
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
..
adc_channel.h feat(global): add macros for GPIO->channel lookup 2017-09-07 10:40:25 +08:00
apb_ctrl_reg.h soc: move header files into soc component 2017-04-11 14:06:40 +08:00
apb_ctrl_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
bb_reg.h soc: define missing M, V macros for nrx, bb, fe, emac, iomux 2017-04-18 17:34:26 +08:00
boot_mode.h soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08:00
can_struct.h CAN Driver 2018-07-04 14:01:57 +08:00
clkout_channel.h feat(global): add macros for GPIO->channel lookup 2017-09-07 10:40:25 +08:00
cpu.h esp_restart: fix possible race while stalling other CPU, enable WDT early 2017-10-26 19:53:53 +08:00
dac_channel.h feat(global): add macros for GPIO->channel lookup 2017-09-07 10:40:25 +08:00
dport_access.h dport: Bigfix dport_read code move to IRAM 2018-05-21 22:00:51 +05:00
dport_reg.h component/bt: implement bluetooth modem sleep mode, one mode for BLE only and another for dual mode bluetooth 2018-05-19 15:37:26 +08:00
efuse_reg.h efuse/add cpu freq rating 2018-03-07 12:16:51 +08:00
emac_ex_reg.h soc: define missing M, V macros for nrx, bb, fe, emac, iomux 2017-04-18 17:34:26 +08:00
emac_reg_v2.h update emac_reg_v2.h 2018-04-25 14:54:09 +08:00
fe_reg.h soc: define missing M, V macros for nrx, bb, fe, emac, iomux 2017-04-18 17:34:26 +08:00
frc_timer_reg.h soc: fix/update definitions related to FRC timers 2017-08-24 16:33:12 +08:00
gpio_pins.h soc: Fix check_long_hold_gpio and move def to soc 2018-06-22 09:20:27 +05:00
gpio_reg.h soc/gpio: fix description of GPIO_STRAP_REG 2017-11-03 15:49:09 +08:00
gpio_sd_reg.h soc: move header files into soc component 2017-04-11 14:06:40 +08:00
gpio_sd_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
gpio_sig_map.h soc: move header files into soc component 2017-04-11 14:06:40 +08:00
gpio_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
hinf_reg.h feat(sdio_slave): add headers for sdio slave components: slc, host, hinf 2018-05-21 23:48:33 +08:00
hinf_struct.h feat(sdio_slave): add headers for sdio slave components: slc, host, hinf 2018-05-21 23:48:33 +08:00
host_reg.h feat(sdio_slave): add headers for sdio slave components: slc, host, hinf 2018-05-21 23:48:33 +08:00
host_struct.h feat(sdio_slave): add headers for sdio slave components: slc, host, hinf 2018-05-21 23:48:33 +08:00
hwcrypto_reg.h esp32 hwcrypto: Use AES registers directly 2017-08-25 16:08:03 +10:00
i2c_reg.h soc: convert line endings to unix 2017-04-11 15:44:22 +08:00
i2c_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
i2s_reg.h soc: move header files into soc component 2017-04-11 14:06:40 +08:00
i2s_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
io_mux_reg.h soc/io_mux: make CLK_OUT fields compatible with REG_SET/GET_FIELD 2018-03-27 12:10:18 +08:00
ledc_reg.h soc: convert line endings to unix 2017-04-11 15:44:22 +08:00
ledc_struct.h LEDC Driver: Added back original definitions of 'duty_resolution' and 'clock_divider'. This update is to provide backward compatibility with ESP-IDF 2.1. 2017-12-04 21:12:56 +01:00
mcpwm_reg.h feature: add Motor Control PWM(mcpwm) driver 2017-05-12 15:47:59 +08:00
mcpwm_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
nrx_reg.h soc: define missing M, V macros for nrx, bb, fe, emac, iomux 2017-04-18 17:34:26 +08:00
pcnt_reg.h soc: convert line endings to unix 2017-04-11 15:44:22 +08:00
pcnt_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
periph_defs.h refactor(spi): move pin information into soc folder 2018-06-14 11:29:15 +08:00
pid.h soc: move header files into soc component 2017-04-11 14:06:40 +08:00
rmt_reg.h soc: convert line endings to unix 2017-04-11 15:44:22 +08:00
rmt_struct.h removed possible uint16 access to 32bit register, noted fifo use not recommended 2018-07-23 07:57:18 +02:00
rtc_cntl_reg.h soc/rtc: restore dbg attenuation when waking from sleep 2018-04-26 18:52:46 +08:00
rtc_cntl_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
rtc_gpio_channel.h feat(global): add macros for GPIO->channel lookup 2017-09-07 10:40:25 +08:00
rtc_i2c_reg.h soc,ulp: add register definitions of RTC_I2C peripheral 2018-01-08 21:28:14 +08:00
rtc_io_reg.h soc: implement XTAL frequency detection 2017-04-24 15:29:30 +08:00
rtc_io_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
rtc.h soc/rtc: CPU frequency settings refactoring 2018-08-21 13:02:03 +08:00
sdio_slave_pins.h Replace all DOS line endings with Unix 2018-07-12 19:10:37 +08:00
sdmmc_pins.h Replace all DOS line endings with Unix 2018-07-12 19:10:37 +08:00
sdmmc_reg.h sdmmc: add SDIO support 2018-04-11 11:07:13 +08:00
sdmmc_struct.h sdmmc host: add handling of CD and WP pins 2018-04-24 19:08:44 +08:00
sens_reg.h driver(i2s): fix broken i2s adc mode 2018-02-07 17:17:20 +08:00
sens_struct.h bugfix(rtc): make sure peripherals (DAC, HALL) are turned off before conversion. 2018-03-28 17:10:01 +08:00
slc_reg.h feat(sdio_slave): add headers for sdio slave components: slc, host, hinf 2018-05-21 23:48:33 +08:00
slc_struct.h feat(sdio_slave): add headers for sdio slave components: slc, host, hinf 2018-05-21 23:48:33 +08:00
soc_ulp.h soc,ulp: add register definitions of RTC_I2C peripheral 2018-01-08 21:28:14 +08:00
soc.h gpio: Bitmask overflow fix in gpio_reset_pin 2018-08-08 15:31:17 +03:00
spi_pins.h Replace all DOS line endings with Unix 2018-07-12 19:10:37 +08:00
spi_reg.h soc: convert line endings to unix 2017-04-11 15:44:22 +08:00
spi_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
syscon_reg.h soc: move header files into soc component 2017-04-11 14:06:40 +08:00
syscon_struct.h feature(I2S-ADC): add ADC mode for I2S. 2017-09-14 13:24:08 +08:00
timer_group_reg.h soc: move header files into soc component 2017-04-11 14:06:40 +08:00
timer_group_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
touch_channel.h feat(global): add macros for GPIO->channel lookup 2017-09-07 10:40:25 +08:00
uart_channel.h feat(global): add macros for GPIO->channel lookup 2017-09-07 10:40:25 +08:00
uart_reg.h Fix uart fifo overflow bug 2018-01-12 14:42:54 +08:00
uart_struct.h Fix uart fifo overflow bug 2018-01-12 14:42:54 +08:00
uhci_reg.h soc: move header files into soc component 2017-04-11 14:06:40 +08:00
uhci_struct.h fix(struct_h): add extern "C" protection to *_struct.h header files. 2017-08-28 18:10:46 +08:00
wdev_reg.h soc: move header files into soc component 2017-04-11 14:06:40 +08:00