I am using this code to run and calibrate an external crystal: (Arduino IDE)
- rtc_clk_32k_bootstrap (512);
- rtc_clk_32k_enable (true);
- rtc_clk_slow_freq_set (RTC_SLOW_FREQ_32K_XTAL);
- for (uint8_t i = 0; i < 5; i ++) rtc_clk_cal (RTC_CAL_32K_XTAL, 3000);
Crystal is high quality so it should be fine.
When the ESP is in normal operation there is no problem with drifting (probably because the RTC is running at 40MHz clock then)
Is there an option to manually change the calibration value to compensate for that error? Or maybe other calibration method / additional line of code needed?
Thanks a lot!