OVMS3-idf/components/soc/esp32
Ivan Grokhotkov 6353bc40d7 Add support for 32k XTAL as RTC_SLOW_CLK source
- RTC_CNTL_SLOWCLK_FREQ define is removed; rtc_clk_slow_freq_get_hz
  function can be used instead to get an approximate RTC_SLOW_CLK
  frequency

- Clock calibration is performed at startup. The value is saved and used
  for timekeeping and when entering deep sleep.

- When using the 32k XTAL, startup code will wait for the oscillator to
  start up. This can be possibly optimized by starting a separate task
  to wait for oscillator startup, and performing clock switch in that
  task.

- Fix a bug that 32k XTAL would be disabled in rtc_clk_init.

- Fix a rounding error in rtc_clk_cal, which caused systematic frequency
  error.

- Fix an overflow bug which caused rtc_clk_cal to timeout early if the
  slow_clk_cycles argument would exceed certain value

- Improve 32k XTAL oscillator startup time by introducing bootstrapping
  code, which uses internal pullup/pulldown resistors on 32K_N/32K_P
  pins to set better initial conditions for the oscillator.
2017-04-26 12:43:22 +08:00
..
include Add support for 32k XTAL as RTC_SLOW_CLK source 2017-04-26 12:43:22 +08:00
test soc: implement XTAL frequency detection 2017-04-24 15:29:30 +08:00
brownout.c soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08:00
cpu_util.c soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08: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 Add support for 32k XTAL as RTC_SLOW_CLK source 2017-04-26 12:43:22 +08:00
rtc_init.c soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08:00
rtc_pm.c soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08:00
rtc_sleep.c soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08:00
rtc_time.c Add support for 32k XTAL as RTC_SLOW_CLK source 2017-04-26 12:43:22 +08:00
soc_log.h soc: add source code of rtc_clk, rtc_pm 2017-04-11 15:45:54 +08:00