Files
SC-F001/sdkconfig.defaults
Thaddeus Hughes f4077e5e26 rtc craziness
2026-03-11 09:01:32 -05:00

23 lines
1.1 KiB
Plaintext

# SC-F001 project-level sdkconfig overrides.
# These are applied during "idf.py reconfigure" and take precedence over IDF defaults.
# Do NOT override settings that are managed by idf.py menuconfig interactively.
# Use external 32kHz crystal for the RTC slow clock (GPIO32/33 on the PCB).
# This gives accurate timekeeping across deep sleep instead of the +/-5% internal RC.
CONFIG_RTC_CLK_SRC_EXT_CRYS=y
# Enable additional drive current for the external 32kHz crystal.
# Required for high-ESR tuning-fork crystals (e.g. CM315D32768DZFT ~70kΩ ESR, CL=12.5pF).
# Without this the ESP32 oscillator can't drive the crystal reliably.
# V2 injects extra current only during the oscillation startup window.
CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT_V2=y
# Increase bootstrap cycles for high-ESR crystal.
# Default of 5 is insufficient; 500 gives the oscillator enough time to build amplitude.
CONFIG_ESP_SYSTEM_RTC_EXT_XTAL_BOOTSTRAP_CYCLES=500
CONFIG_ESP32_RTC_XTAL_BOOTSTRAP_CYCLES=500
# Allow more calibration retries before falling back to RC oscillator.
CONFIG_RTC_XTAL_CAL_RETRY=3
CONFIG_ESP32_RTC_XTAL_CAL_RETRY=3